Session_start () and Linux Encoding Problems

Source: Internet
Author: User
Session_start () and Linux Encoding Problems-general Linux technology-Linux programming and kernel information, the following is a detailed description. Today, when we put php in windows in linux, we still cannot escape the problem of different operating systems. Once again, the boss had to solve the problem with a strong scalp. First, he encountered the session_start () problem. This problem was solved in windows, but in linux again, no matter which system, session_start () has two common errors:

The prompt is basically the same
Warning: session_start () [function. session-start]: Cannot send session cache limiter-headers already sent (output started at ×××. php: 1) in XXX on line 2

First
As described in warning, session_start () is used for repetition. You can remove the duplicate file from the file reference.

Second
After the first problem is solved, this error occurs, most of which are output before session_start! For laruence, this error basically does not happen, but if you write code with DW, this error may also happen to the experts!

So I re-open all the files with zend studio and you will find :. Remove it from the previous point.

If the files written in windows are encoded in UTF-8 format, it is recommended that you do not directly edit them in linux, so the direct editing is performed in gb2312.

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.