icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » PHP, MySQL » Show errors but script working fine

PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >>

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old October 14th, 2004, 6:40 AM   #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
Lyssa is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 14th, 2004, 8:20 AM   #2 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
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 PASS60 PASS61
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!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 14th, 2004, 10:37 AM   #3 (permalink)
rocks your socks.
Resident.
 
David's Avatar
 
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.
__________________
Quote:
Originally Posted by removed View Post
Internet Explorer rules.
David is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 14th, 2004, 5:32 PM   #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?
Lyssa is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 14th, 2004, 5:52 PM   #5 (permalink)
Surpass Fan
Comfy Contributor
 
pbflash's Avatar
 
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.
pbflash is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 14th, 2004, 6:21 PM   #6 (permalink)
Third Plateau
Comfy Contributor
 
Dave's Avatar
 
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)
Dave is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 14th, 2004, 6:54 PM   #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
Kickersny.com is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 14th, 2004, 8:01 PM   #8 (permalink)
Surpass Fan
Comfy Contributor
 
pbflash's Avatar
 
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.
pbflash is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old October 14th, 2004, 8:36 PM   #9 (permalink)
Registered User
Fresh Surpasser
 
Joined in Aug 2004
9 posts
Gave thanks: 0
Thanked 0 times
Quote:
Originally Posted by Dave
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.

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");
Thanks for helping
Lyssa is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On