Solved – Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent
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.

![rax rss rax rss Solved Warning: session start() [function.session start]: Cannot send session cache limiter headers already sent](http://www.programmingfacts.com/wp-content/plugins/rax-email-subscription-and-social-media-links-after-posts/images/rax-rss.jpg)
![rax twitter rax twitter Solved Warning: session start() [function.session start]: Cannot send session cache limiter headers already sent](http://www.programmingfacts.com/wp-content/plugins/rax-email-subscription-and-social-media-links-after-posts/images/rax-twitter.jpg)
![rax facebook rax facebook Solved Warning: session start() [function.session start]: Cannot send session cache limiter headers already sent](http://www.programmingfacts.com/wp-content/plugins/rax-email-subscription-and-social-media-links-after-posts/images/rax-facebook.jpg)
![rax myspace rax myspace Solved Warning: session start() [function.session start]: Cannot send session cache limiter headers already sent](http://www.programmingfacts.com/wp-content/plugins/rax-email-subscription-and-social-media-links-after-posts/images/rax-myspace.jpg)

I am
about 1 year ago
thank you very much… very useful
about 1 year ago
thank you very much… very useful
about 1 year ago
thanks buddy, great done!
about 1 year ago
None of the above helped me
but thank you for sharing!
about 1 year ago
Hi RakshitI would really appreciate some help….I’m having exactlty this problem and wondered if you could take a look at it for me. Any advice would be really appreciated. Its a “caspio” embeded datapage using wordpress. Their support says they cannot find a bug. They have tested exactly the same installation setup on their own server and it works fine without the error.I have hit a complete brick wall in terms of sorting the problem and could really use some help.Thanks Luke
about 1 year ago
ya your solution is working
thank you very much
about 1 year ago
Hi
I still get this error
Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent
I have tried all the suggested things and it still doesn’t fix the problem.
I have this at the start of the page
<?php
ob_start();
session_start();
please help if anyone has some other ideas, i'm going mad trying to solve this
thanks
steve
about 1 year ago
Help me to solve this error.
No one Solution is work for me …
Please help me
about 1 year ago
help me this much of warning Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent.
about 1 year ago
hai this is venki am got solution this problem,
don’t put free face before
to create begineing the page
about 1 year ago
hai this is venki ,
u put the beginig
about 1 year ago
You saved my life! I hope I will be able to write an article as helpful as your in the future!
about 1 year ago
thanks buddy…. it helped me a lot
about 11 months ago
Thankyou. But Warning Messages are also printed to the file. What I how can I remove them.
about 10 months ago
good one it help me to solve my problem
about 10 months ago
thanks man
about 10 months ago
mate you are like my new best friend
this problems has been p*****g me off for soo long and you just solved it for me
cheerse pal
about 10 months ago
Hi! thanks for this article. It helped a lot (My problem is solved with solution #3).
Is there an explanation to why is this happening?
about 9 months ago
Thanks for your solution. Its works for me.
about 8 months ago
Hello, i am having this same issue, and I am ready to pull my hair out trying to figure it out. None of the solutions worked for me. My pages are encoded with utf-8 without the BOM, yet I am still getting this error.
<?php
session_start();
//Include database connection details
require_once('includes/config.php');
require_once('includes/constant.php');
//Array to store validation errors
$errmsg_arr = array();
//Validation error flag
$errflag = false;
If you cvould please give me some tips as to why this is till hapening, I would be forever grateful. Thanks in advance.
about 8 months ago
Please make sure that there is no space before start of page().
about 8 months ago
there is no white space at the beginning of my page, the session_start; is on line 2 of the php file with no white space before it. There are no HTML tags before it either. I should also say that this works on other pages on the site as all the pages are coded the same way. It just does not make nay sense to me. Any ideas? Thanks
about 8 months ago
ob_start();
session_start();
ini_set (‘session.use_cookies’, 1000);
$_SESSION['session_name'] = “superadmin”;
$_SESSION['userid'] =”0″;
but still that error
about 7 months ago
Thanks bud.. Worked like a charm for me..
about 6 months ago
yep..very useful.thanks.I am using osclass.org soft and get this problem.solution 2 solved my problem.
about 6 months ago
thanks so much, silly error
about 5 months ago
The space before <?php caused the problem… thanx man
about 4 months ago
thanx alot…the first solution worked like a charm….
about 3 months ago
thanks for the post its very helpful. It solved my error.
about 1 month ago
Thanks dude ! it really works after edit from Ultra Edit software.
about 1 month ago
Just donwload notepad++ and select
encoding -> encode with utf-8 without BOM and save the php file.
it works