ID: 32568 User updated by: duh at dowebwedo dot com Reported By: duh at dowebwedo dot com Status: Open Bug Type: Session related Operating System: Debian stable PHP Version: 5.0.4 New Comment:
In addition to my bugreport some additional information: The session file appearantly does not contain the last session information that is shown through the print_r($_SESSION): cat sess_9ces9k67hse393stv6dns4t964 DF_debug|b:1; At first I wanted to use the class destructor (__destruct(..) ) with my debugger but appearantly sessions are not available when destructing. Adding $db->show() to my append.inc instead solved that problem. Perhaps the behaviour of __destruct and append.inc are now based on the same rules? Previous Comments: ------------------------------------------------------------------------ [2005-04-04 15:28:16] duh at dowebwedo dot com 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 this bug report at http://bugs.php.net/?id=32568&edit=1