large amounts of db_session data gets lost after redirect |
[eluser]stef25[/eluser]
I noticed that when I assign a large array of data to the db_session and perform a redirect, the data is unavailable on the target page. When I test with one multidimensional array that contains 200 elements and each of those contains another 6 elements that are strings of max 10 words each, this data is unavailable. In the DB this is stored as about 50KB of data. When I test with a similar array that has just 4 instead of 200 elements, the data IS available. AFAIK this has nothing to do with the 4KB limit of cookies? I'm using the db_session to get around this limit. What causes this?
[eluser]bretticus[/eluser]
In these kind of situations, I find I have to go digging into the core code a little. It's kind of the trade off you pay for using a framework. And when that happens a debugger is invaluable. With a debugger, you can step through the code line by line. There are free and pay-for IDE's alike for doing this: Eclipse. Netbeans, Zend Studio, etc. There are even pecl libraries for debugging on the command line. On another note, should you be storing that much data in a session? What about leveraging some sort of op caching in memory instead? Perhaps APC or Memcached or many others.
[eluser]WebsiteDuck[/eluser]
Are you storing any weird data? CodeIgniter's session library makes use of PHP's serialize and unserialize, so you might look into data that breaks those functions.
[eluser]stef25[/eluser]
"should you be storing that much data in a session" Probably not I found a way around it. Will try to debug a bit to see why this is happening.
[eluser]Unknown[/eluser]
What was your resolution to this? I'm running CI 1.7.2 and I have session_data size of around 50k like you and I'm having the same issue types of issues. My resolution was to ditch CI's session and use this session library (http://www.matthewfedak.co.uk/session_hy...niter.html) .. seems to work but it's a bit slow ..
[eluser]InsiteFX[/eluser]
You need to change the user_data in the session table! Code: -- -------------------------------------------------------------- InsiteFX |
Welcome Guest, Not a member yet? Register Sign In |