php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #23199 Encoding causes PHP to think headers already sent
Submitted: 2003-04-14 05:28 UTC Modified: 2003-04-14 05:48 UTC
From: sumairi at hotmail dot com Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.3.1 OS: Linux
Private report: No CVE-ID: None
 [2003-04-14 05:28 UTC] sumairi at hotmail dot com
I have the "Warning: Cannot send session cache limiter - headers already sent" problem with PHP4.3.1, i don't include/require any files before calling session_start(). I get this error even with a test PHP file with one line having only "session_start()". And i don't use auto_prepend.

I found out that this is because the PHP file i upload to my Redhat 8 box is saved with UTF-8 encoding (using notepad), i tried to save it with different encodings (using Windows Notepad also). Only when I save the file with ANSI encoding it will work. Looks like when saving with UTF-8 headers will be sent by apache, or maybe a bug in PHP??

Just in case. this is different than "Content-Type" header. Go to Notepad open any txt file, and click file/save as.., see the encoding option.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-14 05:48 UTC] moriyoshi@php.net
Dupe of bug #22108

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Jun 16 06:00:01 2026 UTC