Re: sessions simply don't work

From: Date: Fri, 19 Dec 2003 21:37:06 +0000
Subject: Re: sessions simply don't work
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-173042@lists.php.net to get a copy of this message
Ken, I had exactly the same problem and it really stumped me for a while. Check your php start and end tags carefully - even a single space before or after the <?php ?> tags (before the session_start() ) will cause this problem. Check any included files before the session_start(). Peter Brad Pauly wrote:
On Fri, 2003-12-19 at 13:18, ken lee wrote:
I'm getting this message all the the time I try to start a session with session_start. Cannot send session cookie - headers already sent It's the first line of code in the file. I'm even getting the error with a single session_start() function on its own in a file. It fails on Apache on my intranet and IIS after being uploaded to a web server. The browser is set to recieve cookies. All the books say it should work.
Is there anything before the first line of code? Any whitespace or html will cause this error. - Brad


« previous php.general (#173042) next »