Welcome Guest, Not a member yet? Register   Sign In
Storing object in a session
#1

[eluser]Keago[/eluser]
Hi all,

I'm using the native session library (autoloaded) supplied in the codeigniter package. I stumbled upon a problem when storing objects in the session. Because the session is started before the php file containing the object is included, the object can't be unserialized resulting in an error.

I solved it by hooking into the pre_system hook. But I prefer to hook in exactly before the session is started. So far I have not seen any possible way to do this without modifying the Session library code. Am I overlooking something or is it just not possible? There must be a nicer way to do this, I guess...

It would be nice if the session class provided a setting for unserializing objects on the fly, instead of immediately at instantiation time.

Thnx.


Messages In This Thread
Storing object in a session - by El Forum - 06-07-2008, 09:52 AM
Storing object in a session - by El Forum - 06-08-2008, 06:58 PM
Storing object in a session - by El Forum - 06-09-2008, 05:32 AM
Storing object in a session - by El Forum - 06-09-2008, 05:47 PM



Theme © iAndrew 2016 - Forum software by © MyBB