Php session_start () about Cannot send session cache limiter-hea

Source: Internet
Author: User

I said that there was already output, And I typed it in the editor. There was nothing in front of it. This was also the case when I used AJAX. Later, I put this PHP file in linux to open it, you will find that at the beginning of the file, there will be a character such as "quotation marks" (in quotation marks), remove it, and then run again. OK, the operation is normal. After searching for some files on the internet, I explained that the BOM (Byte Order Mark) Mark of the UTF8 file will be automatically saved during storage!
Whatever it is, the purpose is to remove it. The methods I have summarized are as follows:
1. Open it in Linux, remove it, and save it.
2. Open it with a Wordpad, place the cursor in the front and back corner, press enter, and delete again, and return to the first line, so that the character at the top will be removed.
3, the use of the UltraEdit Editor (a very useful Editor, online many is, go on their own), open the advanced ---- configuration ---- Unicode/UTF-8 detection, the automatic detection of UTF-8 files, the system automatically detects Unicode files without BOM and removes all the preceding check boxes. After you open the file, you will find that the character "marker" appears and the deletion is OK.


Stupid method: Do you do this when there are many pages?
Set OB_START (); in the first part of the PHP page to solve the problem!

Solution:
Modify session. auto_start = 0 in php. ini to session. auto_start = 1.
Output_buffering = changed to on or any number.
Don't forget to restart...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.