matvespa Posted April 18, 2010 Share Posted April 18, 2010 Hi. I encounter this problem and have looked into the web for solution. I receive answers like remove white spaces and the problem still presist even though i have removed all the white spaces. Could someone please help me with this problem? Error Message: Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/winecom1/public_html/siteb/Register.php:1) in /home/winecom1/public_html/siteb/Register.php on line 7 Here is the link where the problem is at: http://www.wine7000.com/siteb/Register.php Quote Link to comment https://forums.phpfreaks.com/topic/198928-cannot-send-session-cache-limiter-headers-already-sent/ Share on other sites More sharing options...
MiCR0 Posted April 18, 2010 Share Posted April 18, 2010 you need to post all of the code in order for use to see the problem. Quote Link to comment https://forums.phpfreaks.com/topic/198928-cannot-send-session-cache-limiter-headers-already-sent/#findComment-1044174 Share on other sites More sharing options...
PFMaBiSmAd Posted April 18, 2010 Share Posted April 18, 2010 output started at /home/winecom1/public_html/siteb/Register.php:1 (line 1) If there is nothing before the opening php tag in the file and there is no php code on the same line after the php tag that is producing output, then you most likely have a file that has been saved with the UTF-8 BOM (Byte Order Mark) characters. You need to save the file without the BOM characters or save it as an ANSI encoded file. Quote Link to comment https://forums.phpfreaks.com/topic/198928-cannot-send-session-cache-limiter-headers-already-sent/#findComment-1044175 Share on other sites More sharing options...
SaMike Posted April 18, 2010 Share Posted April 18, 2010 Add this to the beginning of your file: <?php ob_start(); And this to the end of your file: ob_end_flush(); ?> This allows you to use headers everywhere between those two lines. Quote Link to comment https://forums.phpfreaks.com/topic/198928-cannot-send-session-cache-limiter-headers-already-sent/#findComment-1044214 Share on other sites More sharing options...
PFMaBiSmAd Posted April 18, 2010 Share Posted April 18, 2010 Except when the output is occurring before that point, as is the case in this thread. It is always better to find and fix problems, than to try and hide them. Output buffering should only be used when you want to buffer output, because it adds overhead to every page that uses it. Quote Link to comment https://forums.phpfreaks.com/topic/198928-cannot-send-session-cache-limiter-headers-already-sent/#findComment-1044220 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.