RE: [PHP] a DOM object in $_SESSION ?
| From: | Per Jessen | Date: | Fri, 17 Aug 2007 10:18:32 +0000 |
| Subject: | RE: [PHP] a DOM object in $_SESSION ? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-260948@lists.php.net to get a copy of this message | ||
Edward Kay wrote:
>> Does anyone know if this works? I've been trying out a few things,
>> and it doesn't seem to work. I.e. the object is there, but the
>> contents aren't.
>
> I don't think it is possible due to the way PHP handles the XML data
> [1].
>
> This is from 2002 / PHP 4.3 but a comment [2] in the PHP manual for
> SimpleXML seems to suggest it is still the case. You could probably
> get around it by using a string representation in the session
> variable.
>
> [1] http://bugs.php.net/bug.php?id=20899&edit=1
Thanks Edward - [1] makes perfect sense. I think I'll just store on it
disk instead and reload when necessary.
/Per