ID: 46784
User updated by: simon dot uyttendaele at gmail dot com
Reported By: simon dot uyttendaele at gmail dot com
-Status: Open
+Status: Closed
Bug Type: Session related
Operating System: Debian etch
PHP Version: 5.2.7
New Comment:
Recompiling PHP made the problem disapear. It is no longer
reproductible.
So hopefully, the problem is now solved.
Previous Comments:
------------------------------------------------------------------------
[2008-12-06 14:31:09] simon dot uyttendaele at gmail dot com
Description:
------------
- Having an auto_prepend script encoded in UTF8
- One regular page encoded in ASCII
- A second page encoded in UTF8
(or the other way around)
Makes all the associative session variables unrecognized.
print_r($_SESSION) does out put the correct session variables. (the key
is probably encoded differently which makes it not recognize it)
Reproduce code:
---------------
PREPEND FILE ENCODED IN UTF8 (no BOM) :
<?php
$dummy = true;
?>
REGULAR FILE ENCODED IN ASCII :
<?php
session_start();
$_SESSION['foo'] = 42;
include( <second page> );
?>
REGULAR FILE ENCODED IN UTF8 :
<?php
echo $_SESSION['foo'];
print_r($_SESSION);
?>
Expected result:
----------------
Display :
-----------------
42Array( [foo] => 42 )
-----------------
Actual result:
--------------
Display :
-----------------
Array( [foo] => 42 )
-----------------
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46784&edit=1