From: ben at vanilla dot net Operating system: FreeBSD 6.2 PHP version: 5.2.0 PHP Bug Type: *Web Server problem Bug description: Sessions fail with numeric string root keys
Description: ------------ If you set a session variable with the root key as a numeric string it fails to save. It also fails to save anything else in the array after the numeric rook key string. This was via FCGI with lighttpd, but also reproduced on Debian etch with apache2. Reproduce code: --------------- Set a session :- <?php session_start(); $_SESSION['Test1'] = "This should be ok"; $_SESSION['123']['test']="This is a test"; $_SESSION['Test2'] = "This is not saved"; ?> <PRE> Session Set: <?php print_r($_SESSION); ?> </PRE> Read it :- <?php session_start(); ?> <PRE> Session Read: <?php print_r($_SESSION); ?> </PRE> Expected result: ---------------- I would expect to see the same details in the session from the second piece of code as output from the first. :- Session Read: Array ( [Test1] => This should be ok [123] => Array ( [test] => This is a test ) [Test2] => This is not saved ) Actual result: -------------- Session Read: Array ( [Test1] => This should be ok ) -- Edit bug report at http://bugs.php.net/?id=40274&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40274&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40274&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40274&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40274&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40274&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40274&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40274&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40274&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40274&r=support Expected behavior: http://bugs.php.net/fix.php?id=40274&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40274&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40274&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40274&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40274&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40274&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40274&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40274&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40274&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40274&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40274&r=mysqlcfg