#35038 [Opn->Bgs]: Header error when saved php file as utf-8
| From: | derick@php.net | Date: | Mon, 31 Oct 2005 18:11:06 +0000 |
| Subject: | #35038 [Opn->Bgs]: Header error when saved php file as utf-8 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-87275@lists.php.net to get a copy of this message | ||
ID: 35038
Updated by: derick@php.net
Reported By: anecdote at yahoo dot com
-Status: Open
+Status: Bogus
Bug Type: Output Control
Operating System: Win32
PHP Version: 5CVS-2005-10-31 (CVS)
New Comment:
This is called the BOM, and this issue has been reported before. See
bug #22108.
Previous Comments:
------------------------------------------------------------------------
[2005-10-31 18:41:38] anecdote at yahoo dot com
Description:
------------
I tried the code below with many version of PHP5 include the lastest
cvs
1.Open notepad
2.Code below
<?
session_start();
//or header(....);
?>
3.Save as UTF-8
4.test
Result...
Warning: session_start() [function.session-start]: Cannot send session
cookie - headers already sent by (output started at
c:\Inetpub\wwwroot\x.php:1) in c:\Inetpub\wwwroot\x.php on line 2
Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent (output started at
c:\Inetpub\wwwroot\x.php:1) in c:\Inetpub\wwwroot\x.php on line 2
........................
No any character before tag <?
But when open file with Hex editor
<?
session_start();
?>
There are 3 special characters before tag <?
I think that is a sign to tell editor know it is UTF-8
Why PHP5 error ?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35038&edit=1