Hello Friends, This is the most common error, you will face when you will start working with sessions in PHP. I got below error. "Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent" and i got success to solve this. So i would like to share this with all of you.
There are many ways,this error originates. Below are some cases which may solve above error for you.
Look at below links for solutions.
Solution 1: 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.
Solution 2: If solution one does not work for you than please make sure that nothing gets sent to the browser before session_start() statement. This happens in case there is a white space or some charactors before session_start() or even before <?php tag. If this is the case, please remove spaces or charactors.It will sovle the "Cannot send session cache limiter" problem.
Solution 3: If both solutions does not make any difference and still you have the same problem than try to set the encoding from UTF-8. UTF-8 encoding add some characters before <?php tag which is the same case as solution 2 and you have remove those charactors. But as those charactors automatically output in page, 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".
To know more about programming,MYSQL database,php info,php editor,programming php,Open-source,php help and php script , subscribe to our feed by entering email address below. You will get updates via email about every tutorial posted on this site . It will not take more than a sec.
Feel free to ask any question. Just leave your comment below and we will answer your comment with in 24 hours.
About Rakshit Patel
I am PHP Freelancer, Rakshit Patel AKA WordPress Freelancer working as PHP Programmer India. I am here to share all my developing knowledge, quick coding techniques, quick solutions to save your time and help you guys for any issue or bug fixing. If you have any PHP, WordPress, Magento related work, please contact me. I am interested for the work.
Facebook • Twitter • Linkedin • Youtube • Flickr • Instagram •