|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-12-07 22:11 UTC] simon dot uyttendaele at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 24 23:00:01 2025 UTC |
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 ) -----------------