Page 1 of 1

Session error message

Posted: Tue Aug 06, 2002 3:26 pm
by Toneboy
Just tried looking up one of my pages and received the following message:

Code: Select all

Warning: Cannot send session cache limiter - headers already sent (output started at /home/sites/site48/web/sub/index.php:3) in /home/sites/site48/web/templates/header1.php on line 6
I know about sending sessions before anything else, but this page isn't different to any other (the first line is a string for the title bar, then there is an include for the session and header). Any ideas what I should look for when trying to solve the problem?

Ta in advance.

Posted: Tue Aug 06, 2002 3:41 pm
by RandomEngy
Well, the output started at line 3, and you tried to start the session on line 6. I'm guessing line 3 is one of your includes. Remeber not to have any whitespace in your include files. The first characters should be <? and the last be ?> . If there is whitespace, it will output them as so, and prevent you from starting a session or sending another header(). If you still can't get it to work, just put an ob_start(); at the top of your page and it should go okay.

Posted: Thu Aug 08, 2002 4:26 am
by Toneboy
Worked like a charm, thanks! :D