Re: [PHP] Storing objects in sessions recursively

2006-11-27 Thread Stut
Jochem Maas wrote: heck it's monday what you expect ;-) (I have the same excuse for fridays) I use the same excuse Tuesday to Thursday, I find that, on balance, it works better for me. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

Re: [PHP] Storing objects in sessions recursively

2006-11-27 Thread Jochem Maas
Stut wrote: > Jochem Maas wrote: >> this is wrong - the ctor is not called at all when unserializing, >> check this >> code snippet: >> >> php -r ' >> class Test { function __construct() { echo "foo\n"; } } >> $t = new Test; >> $s = serialize($t); >> unset($t); >> $u = unserialize($s); >> ' >> >> t

Re: [PHP] Storing objects in sessions recursively

2006-11-27 Thread Stut
Jochem Maas wrote: this is wrong - the ctor is not called at all when unserializing, check this code snippet: php -r ' class Test { function __construct() { echo "foo\n"; } } $t = new Test; $s = serialize($t); unset($t); $u = unserialize($s); ' this only outputs 'foo' once. seems like whatever

Re: [PHP] Storing objects in sessions recursively

2006-11-27 Thread Jochem Maas
Stut wrote: > Dave M G wrote: >> The issue turned out to be my Article class took arguments in its >> constructor, which was unacceptable because the argument could not be >> serialized when being passed along during the session. >> >> By adjusting my object so that the constructor takes no argumen

Re: [PHP] Storing objects in sessions recursively

2006-11-27 Thread Jochem Maas
Dave M G wrote: > Vincent, Jochem, > > Thank you for replying. > > The issue turned out to be my Article class took arguments in its > constructor, which was unacceptable because the argument could not be > serialized when being passed along during the session. why would the arguments need to be

Re: [PHP] Storing objects in sessions recursively

2006-11-27 Thread Stut
Dave M G wrote: The issue turned out to be my Article class took arguments in its constructor, which was unacceptable because the argument could not be serialized when being passed along during the session. By adjusting my object so that the constructor takes no arguments, and then creating a

Re: [PHP] Storing objects in sessions recursively

2006-11-27 Thread Dave M G
Vincent, Jochem, Thank you for replying. The issue turned out to be my Article class took arguments in its constructor, which was unacceptable because the argument could not be serialized when being passed along during the session. By adjusting my object so that the constructor takes no argu

RE: [PHP] Storing objects in sessions recursively

2006-11-24 Thread Vincent DUPONT
Hi, are you sure you did not forget a include of the Article source code ? You need all sources codes aiavlable (included) when getting the object back from the session. vincent -Original Message- From: Dave M G [mailto:[EMAIL PROTECTED] Sent: Fri 24/11/2006 11:22 To: php-general@lists

Re: [PHP] Storing objects in sessions recursively

2006-11-24 Thread Jochem Maas
Dave M G wrote: > PHP List, > > I have a class called "Session", which creates an object stored in the > $_SESSION variable. That object in turn holds on to a "User" object > which keeps track of the activity of the individual user who has logged > in and is using the web site. Then the $user obje