goldrain 0 Report post Posted August 31, 2006 after you have uploaded your site to a web server, sometimes you will find a strange message in your site when you open it: - Warning: session_start(): Cannot send session cookie - headers already sent by (output started at ............... - Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at ........... - Warning: Cannot modify header information - headers already sent by (output started at........................... I tried to analyse what false that happened in that script, here are the result : >> all things that happen above caused by 1.there are blank lines in the end of your script after "?php>" code. better if you try to upload with ASCII mode for pages. 2.The PHP function such as headers(), used with start_session(), produces HTML headers. When the PHP fragments are placed in the body of the HTML, this causes errors because the PHP fragments are trying to put HTML headers within the HTML body. Put the PHP fragments before the HTML body tag. I hope this is useful for you which has same problem with me before. Share this post Link to post Share on other sites
ghostrider 0 Report post Posted September 1, 2006 Thanks for posting this, last year I had such a hard time figuring it out! It was horrible, it took me about 2 days to figure out I had a blank line on the top of my script. Share this post Link to post Share on other sites
electron 0 Report post Posted September 1, 2006 Well actually if u wnat to use sessions on your site it must be called before anything and after <?php .Then you may do whatever you want to do with headers.session_start() must be called first in any circumstance or the ERRORS. Share this post Link to post Share on other sites