From: pavel_bogdanovic at yahoo dot de Operating system: winxp PHP version: 5.0.5 PHP Bug Type: Session related Bug description: Serialize() and Sessions does not work properly
Description: ------------ Situation: The session array key is the same like the var name. After serialize() the argument is also serialized. Reproduce code: --------------- <?php session_start(); $a[] = 'A'; $a[] = 'B'; $_SESSION['arr'] = $a; echo '<pre>'; print_r($_SESSION['arr']); $arr = serialize($_SESSION['arr']); print_r($_SESSION['arr']); echo '<br/>'; print_r($arr); ?> Expected result: ---------------- Array ( [0] => A [1] => B ) Array ( [0] => A [1] => B ) a:2:{i:0;s:1:"A";i:1;s:1:"B";} Actual result: -------------- Array ( [0] => A [1] => B ) a:2:{i:0;s:1:"A";i:1;s:1:"B";} a:2:{i:0;s:1:"A";i:1;s:1:"B";} -- Edit bug report at http://bugs.php.net/?id=34780&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34780&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34780&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34780&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34780&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34780&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34780&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34780&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34780&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34780&r=support Expected behavior: http://bugs.php.net/fix.php?id=34780&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34780&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34780&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34780&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34780&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34780&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34780&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34780&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34780&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34780&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34780&r=mysqlcfg