#35038 [NEW]: Header error when saved php file as utf-8

From: Date: Mon, 31 Oct 2005 17:41:39 +0000
Subject: #35038 [NEW]: Header error when saved php file as utf-8
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-87274@lists.php.net to get a copy of this message
From: anecdote at yahoo dot com Operating system: Win32 PHP version: 5CVS-2005-10-31 (CVS) PHP Bug Type: Output Control Bug description: Header error when saved php file as utf-8 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 &iuml;&raquo;&iquest;<? 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 bug report at http://bugs.php.net/?id=35038&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35038&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35038&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35038&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=35038&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35038&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35038&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35038&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35038&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35038&r=support Expected behavior: http://bugs.php.net/fix.php?id=35038&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35038&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35038&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35038&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35038&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35038&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35038&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35038&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35038&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35038&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35038&r=mysqlcfg

« previous php.bugs (#87274) next »