Welcome Guest, Not a member yet? Register   Sign In
Session - Object Serialize Problem
#5

[eluser]Chad Fulton[/eluser]
I think it is likely that you may be running into the 4kb size limit on session data. When I tested this by serializing one of my own CI objects, I got a 49kb string, although depending on your configuration it might be less for you.

There are a couple of potential solutions:

(1) You could use send only the actual data, and reconstitute the People model on the other side.
(2) You could load the People class by $this->people = new People(); rather than loading it as a model, and then, in the People constructor, call $this->ci =& get_instance(); and make all of the calls in the People model go through $this->ci->db->... or whatever. Then, you could define an __sleep() function which dereferenced the $this->ci variable ($this->ci = null), and an __wakeup() function which reconnected it ($this->ci =& get_instance()Wink

I suspect (1) would be easier / better, if possible.


Messages In This Thread
Session - Object Serialize Problem - by El Forum - 06-29-2009, 09:10 AM
Session - Object Serialize Problem - by El Forum - 06-29-2009, 09:54 AM
Session - Object Serialize Problem - by El Forum - 06-29-2009, 09:59 AM
Session - Object Serialize Problem - by El Forum - 06-29-2009, 10:02 AM
Session - Object Serialize Problem - by El Forum - 06-29-2009, 10:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB