Re: [PHP] store class zithin session

2008-11-21 Thread Alain Roger
Hi Stut, On Thu, Nov 20, 2008 at 12:25 PM, Stut [EMAIL PROTECTED] 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

[PHP] store class zithin session

2008-11-20 Thread Alain Roger
Hi, 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 ? thx. F.

Re: [PHP] store class zithin session

2008-11-20 Thread Stut
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

Re: [PHP] store class zithin session

2008-11-20 Thread Yeti
If you can't load the class before calling session_start you can store the serialized object in a file and simple set a $_SESSION['path_to_file'] session variable.. EXAMPLE: ?php session_start(); //some code class apple_tree { var $apples = 17; } $temporary_file = 'appletree.txt';

Re: [PHP] store class zithin session

2008-11-20 Thread Eric Butera
On Thu, Nov 20, 2008 at 8:37 AM, Yeti [EMAIL PROTECTED] wrote: If you can't load the class before calling session_start you can store the serialized object in a file and simple set a $_SESSION['path_to_file'] session variable.. EXAMPLE: ?php session_start(); //some code class apple_tree

Re: [PHP] store class zithin session

2008-11-20 Thread Jochem Maas
Eric Butera schreef: On Thu, Nov 20, 2008 at 8:37 AM, Yeti [EMAIL PROTECTED] wrote: ... Autoload. Why on earth would you do such a thing? autoload ... your neighbourhood opcode cache performance killer, then again so is file based sessions (for ease of use I stick my session files on

Re: [PHP] store class zithin session

2008-11-20 Thread Eric Butera
On Thu, Nov 20, 2008 at 2:07 PM, Jochem Maas [EMAIL PROTECTED] wrote: Eric Butera schreef: On Thu, Nov 20, 2008 at 8:37 AM, Yeti [EMAIL PROTECTED] wrote: ... Autoload. Why on earth would you do such a thing? autoload ... your neighbourhood opcode cache performance killer, then again so

Re: [PHP] store class zithin session

2008-11-20 Thread Kevin Waterson
This one time, at band camp, Alain Roger [EMAIL PROTECTED] wrote: Hi, 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. http://www.phpro.org/tutorials/Introduction-To-PHP-Sessions.html#8 Kevin -- PHP General

Re: [PHP] store class zithin session

2008-11-20 Thread Stut
On 20 Nov 2008, at 19:35, Eric Butera wrote: Well I wouldn't put objects into the session to begin with. Why not? I do it all the time and it works fine. I was just talking about this specific case. Wouldn't autoload be fine if the file was already in the opcode cache? Opcode caches work

Re: [PHP] store class zithin session

2008-11-20 Thread Eric Butera
On Thu, Nov 20, 2008 at 2:51 PM, Stut [EMAIL PROTECTED] wrote: On 20 Nov 2008, at 19:35, Eric Butera wrote: Well I wouldn't put objects into the session to begin with. Why not? I do it all the time and it works fine. I was just talking about this specific case. Wouldn't autoload be fine