Sorry for that.... ctrl+enter sends, when I wanted ctrl+V to paste :(
All registered variables are serialized after the request finishes. Registered
variables which are undefined are marked as being not defined. On subsequent
accesses, these are not defined by the session module unless the user defines
them later.
Warning
Some types of data can not be serialized thus stored in sessions. It includes
resource variables or objects with circular references (i.e. objects which
passes a reference to itself to another object).
Note: Session handling was added in PHP 4.0.0.
Note: Please note when working with sessions that a record of a session is
not created until a variable has been registered using the session_register()
function or by adding a new key to the $_SESSION superglobal array. This holds
true regardless of if a session has been started using the session_start()
function.
So I'd assume his class has a circular reference if it cannot be serialized,
and how to fix that I'm going to pass on.
-----Original Message-----
From: Zoltán Németh [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 19, 2007 8:40 AM
To: Tobias Wurst
Cc: [email protected]
Subject: Re: [PHP] serialize an object
as far as I know serialize() saves all the properties of the object...
and I think you can store objects in session without serializing it
since PHP serializes-unserializes it for you automatically - or not?
greets
Zoltán Németh
2007. 04. 19, csütörtök keltezéssel 13.17-kor Tobias Wurst ezt írta:
> hi,
> i use serialize() to save my object in $_SESSION.
> But i have one Problem:
> the member-variables from the baseclass are not saved.. :(
> How can i fix this?
>
> thanks in advance
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php