Hi Mike

Yes your right about when the session data is updated.  The problem then
lies in when I try to read the object from the session var.  I include at
the top of the file the class definition.

Not to get sidetracked but when you say you wrote another layer, are you talking
about utilizing the __sleep() and __wakeup functions and then serializing/unserializing
within those functions?


so far manually serialize-ing and unserialize-ing prior to assigning the object and
after retrieving the object seems to work.


Matt

Mike Migurski wrote:

Wow thats strange?? I am using PHP 4.3.2 as well and I don't see that
happening where it serializes the object when assigning it to the
$_SESSION.



It doesn't do it when you assign it into the $_SESSION array, it does it when the script completes and updated session data is written to the session file. This actually caused me a lot of grief a while back, when scripts were bombing out and session data was being lost - I ended up writing another layer on top of the session that explicitly wrote crucial data at critical junctures, rather than relying on the built-in support.


--------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html



Reply via email to