Warning: session_start(): cannot send session cache limiter – headers already sent – What’s wrong?
Have you ever had trouble with the session start of PHP? For example, when you started a session on a particular page, did you get the error: Warning: session_start(): cannot send session cache limiter – headers already sent before? Actually, the error means that some data has been already sent to the server and you are not able to send the header anymore.
If you are seeking some solutions to solve this trouble, we would like to show you some suggested methods that help other users successfully fix it. So, now, let’s start!
How to fix Warning: session_start(): cannot send session cache limiter – headers already sent
Here are some ways you should try one by one to find the most useful one.
- Solution 1: Check out the code and make sure that the
<?php
is the first character. That means there is no space or tab before. - Solution 2: Put the code
<?php session_start(); ?>
above all other code. - Solution 3: Change the encoding of the document from UTF-8 to ANSI. Or you can use UTF-8 encoding without BOM (Byte Oder Mark) by ensuring that you don’t use notepad.exe to edit or save the files since it will insert UTF-8 BOM.
Conclusion
All in all, we have already shared with you the three methods to fix this common error: Warning: session_start(): cannot send session cache limiter – headers already sent. Therefore, we hope that it will be useful for you. If you have more ideas to address this trouble, don’t hesitate to let us know by leaving your comment below.
Furthermore, if you are using WordPress or Joomla and want to change the appearance of your site, let’s have a look at the collection of Free WordPress Themes as well as Joomla 4 Templates here. Thanks for your attention and have a wonderful day.
0 Commentaires