Re: Getting Objects out of the $SESSION variable unscathed
| From: | Aziz Saleh | Date: | Thu, 12 Feb 2015 20:39:38 +0000 |
| Subject: | Re: Getting Objects out of the $SESSION variable unscathed | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-324443@lists.php.net to get a copy of this message | ||
On Thu, Feb 12, 2015 at 2:00 PM, JEofVA <JEofVA@gmail.com> wrote:
> I'm having a problem getting my objects out of the $SESSION variable. I
> am storing an ordinal array of associate arrays where one of the associate
> array elements is an object. Unfortunately, when I pull it back out, the
> object is "broken" with "__PHP_Incomplete_Class" errors.
>
> From what I can read this has something to do with 'serialization' - i.e.,
> the emerging object must be unserialized (http://php.net/manual/en/
> function.unserialize.php). However, I can't get it to work.
>
> Any tips on how that is done, or what I should do instead?
>
> This program is being developed on a testing server that can then be put
> on a production server.
>
> Here are my server specs:
> Apache Version : 2.2.17
> PHP Version : 5.3.3
> MySQL Version : 5.5.8
>
>
> Thanks in advance,
>
> Jonathan
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
This usually happens when you are attempting to serialize the object before
including the class file. Is the file included before you are unserialize
it?