UGN Security
Posted By: Rapture Odd php problem I keep getting - 08/04/03 08:36 AM
I keep getting this...

Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.deliriumgaming.com/html/header.php:31) in /web/htdocs/www.deliriumgaming.com/html/includes/sessions.php on line 251

Warning: Cannot modify header information - headers already sent by (output started at /web/htdocs/www.deliriumgaming.com/html/header.php:31) in /web/htdocs/www.deliriumgaming.com/html/includes/sessions.php on line 252

Line 31 on the header looks like this:
Code
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
like 251 on sessions.php looks like this:
Code
setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);
any suggestions? I'm lost
Posted By: Rapture Re: Odd php problem I keep getting - 08/04/03 08:40 AM
oh yeah, i've tried to comment out line 31 but that didn't change anything.
Posted By: Rapture Re: Odd php problem I keep getting - 08/04/03 09:10 AM
LOL I always post up questions and then find the answer for them. I feel bad if it's wasting space n'stuff but all I did was put this at the beggining of session.php and it fixed it. I hope it doesn't have any side effect smile

Code
ob_start();
Posted By: Cold Sunn Re: Odd php problem I keep getting - 08/04/03 01:51 PM
Haha, I end up asking questions and finding the answer also. At least if someone with a similar problem sees your post, they will be helped.
Posted By: Brett Re: Odd php problem I keep getting - 08/25/03 07:27 AM
Your trying to setcookies after print/echo text. This just isn't allowed.
© UGN Security Forum