Re: store class zithin session

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Stut,

On Thu, Nov 20, 2008 at 12:25 PM, Stut <stuttle@xxxxxxxxx> wrote:

>  On 20 Nov 2008, at 11:01, Alain Roger wrote:
>
>> i have a class and i would like to store it zithin session.
>> i was thinking to use serialize/unserialize but it does not work.
>>
>> any idea how to do it ?
>>
>
> Alain, you've been on this list long enough to know that "it does not work"
> is not enough information for people to be able to help you.
>

 You're right and i feel sorry. i thought i paste my code just after the
sentence.
ok, anyway i solved my problem somehow :-)


>
> Firstly there is no need to serialise anything going into the session.
> Secondly I assume you want to store objects not classes.

yes.


> Thirdly there is no reason why it should not work, but there are some
> caveats you need to be aware of...
>
> * The class definition must have been loaded before session_start() is
> called, otherwise you'll end up with an object of type stdClass rather than
> your class.

this was my mistake...i mean to not call the class file before starting the
session :-(


A.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux