Home > Article > Backend Development > php session_start() about Cannot send session cache limiter - hea_PHP tutorial
It is said that there is already output. When I type it in the editor, there is nothing in front of it. It turns out that this situation also happened when using AJAX. Later, when I open this PHP file in Linux, I will find that at the end of the file In the front, there will be a character like "锘" (within quotation marks). After removing it, run it again. OK, it runs normally. Later, I searched for some files on the Internet, and the explanation given was: The BOM (Byte Order Mark) mark of the UTF8 file will be automatically saved when saving!
No matter what it is for, the purpose now is to remove it. I have summarized the following three methods:
1. Open it under Linux, remove it and then save it
2. Open it with WordPad , put the cursor at the end and press Enter, then type delete and return to the first line, so that the first character will be removed
3. Use UltraEdit editor (a very useful editor, online Most of the time, go down by yourself), open Advanced----Configuration----Unicode/utf-8 Detection, uncheck all the previous check boxes for automatically detecting UTF-8 files, automatically detecting Unicode files without BOM, etc., and then you When you open that file again, you will find that the character "锘" appears, and it is OK to delete it
Stupid method: Do you also do this when there are many pages?
In PHP Set OB_START(); directly at the header of the page and you can solve it!
Solution:
Modify session.auto_start = 0 in php.ini to session.auto_start = 1
output_buffering = changed to on Or any number.
Then don’t forget to reboot...