#20862 [Opn->Fbk]: registered objects are not saved with the session

From: Date: Fri, 11 Jul 2003 02:38:44 +0000
Subject: #20862 [Opn->Fbk]: registered objects are not saved with the session
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-43723@lists.php.net to get a copy of this message
ID: 20862 Updated by: sniper@php.net Reported By: php at gaofi dot com -Status: Open +Status: Feedback Bug Type: Session related Operating System: Linux 2.4.18 PHP Version: 4.3.1 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Previous Comments: ------------------------------------------------------------------------ [2002-12-09 10:00:01] php at gaofi dot com Finally, I may be a serialization problem. The serialization seems to behave strangely. ------------------------------------------------------------------------ [2002-12-09 09:24:20] php at gaofi dot com I tried with the latest version, with the same results. ------------------------------------------------------------------------ [2002-12-06 18:52:15] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip ------------------------------------------------------------------------ [2002-12-06 10:12:36] php at gaofi dot com Hello, This is partially taken from comments I made on someone else's bug report #20449, as I don't know if it's the same or not. Problem : When a session is saved, included objects are not. I have setup a small test platform, with custom session handlers to a database, and DBMS in debug mode. When I force a session write before the end of the script, I get the _whole_ session var serialized. When I force a sess_write_close at the same place, I get a _truncated_ serialized session var (objects missing, but vars still there) When I let things behave normally (not forcing write), I get a _truncated_ serialized session var (objects missing, vars present) When I try to bypass arguments passed to my sess_write function by using $PHPSESSID, and serialize($session), I get an error stating that $session has been destroyed. Thus, I have an hypothesis : The objects inside the session var are destroyed _before_ the serialization occurs, leading to a truncated result. regards, ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20862&edit=1

« previous php.bugs (#43723) next »