How to fix the Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent error

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent

Ok your fiddling with a Joomla install (probably changing servers/hosts or moving you joomla install out of one folder/directory into the next) and you get an "How to fix the "Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent" error

More specifically, the error probably looks like this:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /your/joomla/install/path/configuration.php:1) in /your/joomla/install/path/libraries/joomla/session/session.php on line 423

Warning: Cannot modify header information - headers already sent by (output started at /your/joomla/install/path/configuration.php:1) in /your/joomla/install/path/libraries/joomla/session/session.php on line 426

You will be pleased to know the solution is siimple.

The problem lies with your configuration.php file.

The first thing to check is that is is saved in the correct fromat. Open configuration.php in notepad and click save as. Make sure the encoding is set to ANSI. If not save it and averwrite the old one then upload it to the server. You should no longer get the error "Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent".

save as encoding=ANSI dialogue box

If that does not solve it, open the configuration.php file again and make sure the are no lines or spaces before the "<?php" or after "?>" if a line or space has been put there, delete it, save the file (I reccomend you use save as and make sure it is still formatted as encoding=ANSI in case you fix the error only to introduce the same error again). Now I hope "Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent" no loger appears.

If you are still having problems, you will have to look through each line of you configuration.php and make sure there are no spaces at the end of lines and that all the code is correct (ie. if it has a ' symbol that later there is a '; at the end)

Good luck!

Posted in Joomla