Home > Backend Development > PHP Tutorial > PHP error: Cannot send session cookie – headers already sent by solution

PHP error: Cannot send session cookie – headers already sent by solution

WBOY
Release: 2016-07-25 09:04:30
Original
1311 people have browsed it
  1. UTF-8 EF BB BF
  2. UTF-16 Big Endian FE FF
  3. UTF-16 Little Endian FF FE
  4. UTF-32 Big Endian 00 00 FE FF
  5. UTF-32 Little Endian FF FE 00 00
Copy the code

Solution: When performing PHP session operations, if: Warning: Cannot send session cookie – headers already sent…” or “Cannot add header information – headers already sent…” appears

Just set the Output_buffering in php.ini, the default value is no, change it to 1.



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template