| PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#1 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Aug 2004
9 posts
Gave thanks: 0
Thanked 0 times
|
Show errors but script working fine
Is there any way I can hide the warnings? What I just did was just adding another text box to the form. It does works. I’ve added a story and added a chapter and there’s nothing wrong with it except for the warning lines.
The code of the stories can view from this page: http://story555.bravehost.com/stories.html header's code: http://story555.bravehost.com/header.html The errors say Code:
Warning: Missing argument 17 for newstory() in /home/celebri/public_html/Fanfic/stories.php on line 45 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/celebri/public_html/Fanfic/stories.php:45) in /home/celebri/public_html/Fanfic/header.php on line 3 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/celebri/public_html/Fanfic/stories.php:45) in /home/celebri/public_html/Fanfic/header.php on line 3 Warning: Cannot modify header information - headers already sent by (output started at /home/celebri/public_html/Fanfic/stories.php:45) in /home/celebri/public_html/Fanfic/header.php on line 4 Warning: Cannot modify header information - headers already sent by (output started at /home/celebri/public_html/Fanfic/stories.php:45) in /home/celebri/public_html/Fanfic/header.php on line 5 Warning: Cannot modify header information - headers already sent by (output started at /home/celebri/public_html/Fanfic/stories.php:45) in /home/celebri/public_html/Fanfic/header.php on line 6 |
|
|
|
|
|
#2 (permalink) |
|
minor deity
Super #1
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
|
Look for blank line-feeds (blank lines) in your PHP files after the PHP close tag ?>
John
__________________
Proud to be a Surmunity Mod! XEON Make a fundamental difference! My Sites: Curious about Brewing Beer? Join the community! >>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax Get into an Art museum Victorian London It's your brain -ON WEB - mybrainhost.com (under development) What SHOULD Government do? Much Less than it Does! |
|
|
|
|
|
#3 (permalink) |
|
rocks your socks.
Resident.
Joined in Mar 2004
Lives in fear of Obama.
Hosted on Pass 7
13,170 posts
Gave thanks: 8
Thanked 35 times
|
There is a way to avoid seeing the warnings, but that involves changing the php.ini file I believe. I could be wrong though.
|
|
|
|
|
|
#4 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Aug 2004
9 posts
Gave thanks: 0
Thanked 0 times
|
There is a blank line after ?> and I deleted it but it still doesn't work. Everytime I open the file to edit, the blank line still there (but I did delete it before). What id php.ini how do I change it?
|
|
|
|
|
|
#5 (permalink) |
|
Surpass Fan
Comfy Contributor
Joined in Sep 2004
209 posts
Gave thanks: 0
Thanked 0 times
|
The first error is an error in the script as it says it is missing argument 17 for the newstory() function. This means one of the required variables for that function is not getting passed to it.
The rest of the errors are generally caused by extra lines either above or below the <?php ?> tags at the top and bottom of the file. Look for extra space in your header.php and stories.php files as these are the 2 files mentioned in the errors. To turn off the errors you would have to ask support to change the servers php.ini file but I don't think they will as it will affect everyone on the server.
__________________
Pass14 www.tqwebservices.com www.autoappraisalsunlimited.com www.clevelandlayne.com Pass18 www.estateagency.com.au Some people drink deeply from the fountain of knowledge. Others just gargle. |
|
|
|
|
|
#6 (permalink) |
|
Third Plateau
Comfy Contributor
Joined in Apr 2004
Lives in East Hanover, New Jersey
Hosted on Nifty
272 posts
Gave thanks: 0
Thanked 0 times
|
Warning: Missing argument 17 for newstory() in /home/celebri/public_html/Fanfic/stories.php on line 45
Like pbflash said, that error was because argument 17 was left out. Was stories.php a file that you had to edit yourself? You could try posting lines around 40-50 here and we can see if there's anything wrong with the syntax. The rest of the errors are triggered by the first error and would go away when that's fixed.
__________________
site (syberdave.net) - server (nifty) |
|
|
|
|
|
#7 (permalink) |
|
Surpass Fan
Super #1
Joined in Aug 2004
Hosted on SH58
1,688 posts
Gave thanks: 6
Thanked 7 times
|
if you don't care about the errors, just put an 'at' symbol in front of the function... (Surpass replaces it with '[at]' )
Code:
[at]header();
__________________
- Evan Charlton | [site] | Server - SH58 |
|
|
|
|
|
#8 (permalink) |
|
Surpass Fan
Comfy Contributor
Joined in Sep 2004
209 posts
Gave thanks: 0
Thanked 0 times
|
It would be better to correct the problem instead of hiding it.
__________________
Pass14 www.tqwebservices.com www.autoappraisalsunlimited.com www.clevelandlayne.com Pass18 www.estateagency.com.au Some people drink deeply from the fountain of knowledge. Others just gargle. |
|
|
|
|
|
#9 (permalink) | |
|
Registered User
Fresh Surpasser
Joined in Aug 2004
9 posts
Gave thanks: 0
Thanked 0 times
|
Quote:
Here's the code: line 45 start at "function newstory(...." line 49 start at :global... line 51 start at "include ("..." Code:
function newstory($submit, $catid, $gid, $rid, $charid, $storyfile, $storytext, $wid, $title, $chapter, $code, $summary, $uid, $rr, $mailinglist, $numchars, $numgenres)
{
global $tableprefix, $logo, $adminarea, $skin, $home, $recent, $catslink, $authors, $help, $search, $login, $titles, $logout, $store, $useruid, $userpenname, $numcats, $autovalidate, $sitename, $siteemail, $url, $roundrobins, $code, $storiespath;
include ("header.php");
|
|
|
|
|