Re: [PHP] Stopping objects from auto-serializing
- From: jochem@xxxxxxxxxxxxx (Jochem Maas)
- Date: Wed, 31 Oct 2007 08:16:01 +0100
David Christopher Zentgraf wrote:
On 31 Oct 2007, at 15:32, Jochem Maas wrote:
aside from this error (my guess is your not allowed to override it) I...
can't
see the problem of serialization .. don't put the object in $_SESSION?
what are you doing? show us the code?
I'm not putting the object in $_SESSION, but PHP apparently does on this
specific configuration.
I'm saving an array of ids in $_SESSION["basket"], and on some pages I
have an object called $basket.
Somehow this $basket gets saved into $_SESSION["basket"], where it
simply does not belong because it makes my code barf.
Seems I'll have to rename my variables, but aside from this specific
fix, I don't want any unneeded variables floating around my $_SESSION
and I certainly don't want them to be globally_registered.
are you using session_register()? (dont)
also are you setting the value in $_SESSION by reference?
e.g. $_SESSION['foo'] =& $bar; $bar = new Foo;
.
- Follow-Ups:
- Re: [PHP] Stopping objects from auto-serializing
- From: David Christopher Zentgraf
- Re: [PHP] Stopping objects from auto-serializing
- References:
- Stopping objects from auto-serializing
- From: David Christopher Zentgraf
- Re: [PHP] Stopping objects from auto-serializing
- From: Jochem Maas
- Re: [PHP] Stopping objects from auto-serializing
- From: David Christopher Zentgraf
- Stopping objects from auto-serializing
- Prev by Date: Re: [PHP] Stopping objects from auto-serializing
- Next by Date: Re: [PHP] GD Library
- Previous by thread: Re: [PHP] Stopping objects from auto-serializing
- Next by thread: Re: [PHP] Stopping objects from auto-serializing
- Index(es):
Relevant Pages
|