PowWeb Forums - The Perfect Community for the Perfect Host  

Register now to interact with over 11,000 members! Registered users have Posting Privileges, free access to Private Messaging, Email Notifications and more.

Go Back   PowWeb Community Forums > The PowWeb Platform > PHP
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Closed Thread
 
Thread Tools
Old 2-3-03, 03:43 PM   #1
Rhymes
Guest
 
Posts: n/a
Webpage Problem (Part 5)

Hey guys, I looked but did not find this exact error, I looked alot (with search) so...


Warning: Cannot modify header information - headers already sent in /www/o/xxxxxx/htdocs/html/modules/Forums/includes/sessions.php on line 317

Warning: Cannot modify header information - headers already sent in /www/o/xxxxxx/htdocs/html/modules/Forums/includes/sessions.php on line 318


www.battleoftheoutlaws.com

SOmetimes its lines 200 and 201 it changes.

This happened after the updates?? Anyone know

Rhymes
 
Old 2-3-03, 03:56 PM   #2
LexF
Guest
 
Posts: n/a
You have to set your headers before you send any output to the browser.

So if you have <HTML> and then <?PHP // send header info ?>, the script will crash. All headers must precede any displayed content.
 
Old 2-3-03, 03:57 PM   #3
bdoc
 
bdoc's Avatar
 
Join Date: Dec 2002
Location: Perhaps
Posts: 1,222
Reputation: 5
PHP doesn't really like you setting cookies or sessions outside of the header, and if you look at your error it has to do with your sessions. This info must be put before your first <html> tag.

It seems as if the new PHP 4.3 is not very forgiving about this whereas 4.23 seemed to be more flexible with it.

Hope this helps!
bdoc is offline  
Old 2-3-03, 06:20 PM   #4
Rhymes
Guest
 
Posts: n/a
Hmm ok I think I understand. So I went through my sessions.ph file and didnt find anything about <HTML>.

So How does someone fix this?
Like is there a tutorial?

Rhymes
 
Old 2-3-03, 10:50 PM   #5
bdoc
 
bdoc's Avatar
 
Join Date: Dec 2002
Location: Perhaps
Posts: 1,222
Reputation: 5
Can't really troubleshoot without code, post some...
bdoc is offline  
Old 2-4-03, 04:51 AM   #6
HalfaBee
 
HalfaBee's Avatar
 
Join Date: Feb 2002
Location: Sydney, Australia
Posts: 7,266
Reputation: 340
If any character is sent before the headers PHP automatically sends the html headers and then sends the character.
Any php script that does not have <? as the first characters will have already sent the headers and a character.
Even a blank line or space before the <?php tag causes this to happen.

Good luck
HalfaBee
__________________
I don't suffer from laziness, I enjoy every minute!
Edit your php.ini here
http://members.powweb.com/member/cgi...nt/PHPplus.bml

Last edited by HalfaBee; 2-4-03 at 05:00 AM..
HalfaBee is offline  
Closed Thread

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:17 PM.


Contents ©PowWeb, Inc. ~ vBulletin, Copyright © 2000-2007 Jelsoft Enterprises Limited.