Solution to Cannotsendsessioncachelimiter-headersalreadysent errors

Source: Internet
Author: User
For details about how to solve the Cannotsendsessioncachelimiter-headersalreadysent error-Linux general technology-Linux programming and kernel information, see the following. Programming in windows, when the session_start () method is used

Session_start () [function. session-start]: Cannot send session cache limiter-headers already sent (output started at/var/www/inpublisher/php1.php: 1) indicates that an output already exists, I typed it in the editor, but there was nothing in the front. This was also the case when I used AJAX. Later, I put this PHP file in linux and I found that, at the beginning of the file, a character such as "success" will appear (in quotation marks). After removing it, it will run again. OK, and it will run normally. 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 hooks. After you open the file, you will find that the character "marker" appears and the deletion is OK.

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.