From:             zjcboy at fescomail dot net
Operating system: win xp pro
PHP version:      4.3.1
PHP Bug Type:     Session related
Bug description:  encoding of .php file affects php behaviour

Description:
------------
PHP Code:
<?php 
session_start(); 
$_SESSION['test']='this is a test'; 
echo $_SESSION['test']; 
?> 
If the code above is encoded in ANSI, it works fine.
But if the code is encoded in Unicode or UTF8, it just says "Cannot send
session cache limiter - headers already sent ".

Note that when encoded in different formats, the size of the .php file is
different. For example, the code above, when encoded in ANSI, is just 90
bytes. but in Utf8, it is 93 bytes and in Unicode, it's 182 bytes.
PHP Code:
session_start(); 
requires to be put before any output, but in UTF8, the 3 extra bytes
compared from in ANSI may cause some output.(I think so)

Because I have to echo some non-english characters (such as Chinese), I
have to use Unicode or UTF8 encoding, but it doesn't work as mentioned
before. I wonder if there's any way to solve this. 


Expected result:
----------------
no matter how .php files are encoded, they just work fine.


-- 
Edit bug report at http://bugs.php.net/?id=24607&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=24607&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=24607&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=24607&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24607&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24607&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24607&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24607&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24607&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24607&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24607&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24607&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24607&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24607&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24607&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24607&r=gnused

Reply via email to