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

Tuesday, February 1, 2011

This is the common error, you can see when you will start working with sessions in PHP. 
*The below are some cases which may solve above error .
Write ob_start() before session_start() statement. As ob_start() turn on output buffering means no output sent to script and it stores the output in internal buffer and make sure that nothing gets sent to the browser before session_start() statement. This happens in case there is a white space or some characters before session_start() or even before
*Also, you can solve this by using UTF-8 encoding WITHOUT BOM (Byte Order Mark). “Don’t save your UTF-8 files with BOM as it creates issues”.

No comments:

Post a Comment

 

Most Reading

Sidebar One

+1-800-574-0902 +44-20-7993-2673 (ID: 173296)