php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20862 registered objects are not saved with the session
Submitted: 2002-12-06 10:12 UTC Modified: 2003-07-18 18:47 UTC
From: php at gaofi dot com Assigned:
Status: No Feedback Package: Session related
PHP Version: 4.3.1 OS: Linux 2.4.18
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
30 + 46 = ?
Subscribe to this entry?

 
 [2002-12-06 10:12 UTC] 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,

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-06 18:52 UTC] 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-09 09:24 UTC] php at gaofi dot com
I tried with the latest version, with the same results.
 [2002-12-09 10:00 UTC] php at gaofi dot com
Finally, I may be a serialization problem.

The serialization seems to behave strangely.
 [2003-07-18 18:47 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 21:01:30 2024 UTC