From: duh at dowebwedo dot com Operating system: Debian stable PHP version: 5.0.4 PHP Bug Type: Session related Bug description: session data is not available
Description: ------------ Session data stored in the session is not available when reloading the page again. This problem occured after upgrading from php 5.0.3 to 5.0.4; in 5.0.3 we do not experience this problem. The last (append.inc) session listing in the first page request shows the session variables added to the session. One would expect these variables to show in the first (prepend.inc) session listing in the second page request. However, they do not show? The same situation using php 5.0.3 returns the expected result, so it can safely be assumed that modifications made in php 5.0.3 to php 5.0.4 has introduced this session problem. Reproduce code: --------------- Example source: --------------- prepend.inc <?php print_r($_SESSION); ... $db = new debugger(); ... ?> ---application--- append.inc <?php $db->show(); ... print_r($_SESSION); ?> Info: ----- The application reads and writes to the session which means the session in the prepend can contain different values than in the append. Reading and Writing is done in classes (in this example: class debugger). Expected result: ---------------- Output first page request: -------------------------- Array ( ) ... Array ( [DF_debug] => 1 [DF] => Array ( [debugger] => Array ( [debug_script] => [debug_php] => [debug_debugging] => [debug_queries] => [debug_get] => [debug_post] => [debug_cookie] => [debug_session] => ) ) ) Output second page request: --------------------------- Array ( [DF_debug] => 1 [DF] => Array ( [debugger] => Array ( [debug_script] => [debug_php] => [debug_debugging] => [debug_queries] => [debug_get] => [debug_post] => [debug_cookie] => [debug_session] => ) ) ) ... Array ( [DF_debug] => 1 [DF] => Array ( [debugger] => Array ( [debug_script] => [debug_php] => [debug_debugging] => [debug_queries] => [debug_get] => [debug_post] => [debug_cookie] => [debug_session] => ) ) ) Actual result: -------------- Output first page request: -------------------------- Array ( ) ... Array ( [DF_debug] => 1 [DF] => Array ( [debugger] => Array ( [debug_script] => [debug_php] => [debug_debugging] => [debug_queries] => [debug_get] => [debug_post] => [debug_cookie] => [debug_session] => ) ) ) Output second page request: --------------------------- Array ( [DF_debug] => 1 ) ... Array ( [DF_debug] => 1 [DF] => Array ( [debugger] => Array ( [debug_script] => [debug_php] => [debug_debugging] => [debug_queries] => [debug_get] => [debug_post] => [debug_cookie] => [debug_session] => ) ) ) -- Edit bug report at http://bugs.php.net/?id=32568&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32568&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32568&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32568&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32568&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32568&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32568&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32568&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32568&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32568&r=support Expected behavior: http://bugs.php.net/fix.php?id=32568&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32568&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32568&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32568&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32568&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32568&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32568&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32568&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32568&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32568&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32568&r=mysqlcfg