Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/mark1471/public_html/shop.php:6) in /home/mark1471/public_html/library/config.php on line 3
If you try to call session_start() after any content has been output to the page, you will get this error. Make sure that none of your included files are outputting any content to the page such as with an echo or print statement BEFORE you call session_start. Also, it could be as simple as blank lines following your closing PHP tag in any of your includes...such trailing whitespace gets output to the page at the end of each include--eliminate it if it exists.
It is usually a good idea to put the session_start() call as your topmost declaration whenever possible, or to use the output buffer to flush all output to the browser at once. output buffering is an advanced topic, but you can learn more about it here.
johnsquibb
Junior Poster in Training
84 posts since Nov 2007
Reputation Points: 14
Solved Threads: 14
where is session_start in shop.php ?
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
yep.. You should have session_start on top of every page which uses session/session variable.
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
check if you are echoing anything or having any html tags before calling a header function.
nav33n
Purple hazed!
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
at the top of your config.php you start output buffering, but have commented it out:
//ob_start("ob_gzhandler");
that probably means that the script sends headers throughout it...you may want to turn output buffering back on, otherwise you may be hunting down headers, echo statements, and whitespace until you're ready to pull your hair out and the script doesn't work anymore.
you can learn more about ob_gzhandler here: http://us.php.net/manual/en/function.ob-gzhandler.php
or you may just want to replace it with a plain old ob_start() call at the start, and an ob_end_flush() at the end of your scripts.
johnsquibb
Junior Poster in Training
84 posts since Nov 2007
Reputation Points: 14
Solved Threads: 14