In Codeigniter after login I am storing all the data into session and redirecting to some controller.But i am loosing all values in that controller and code redirect back to login page. I try every trick to debug this issue but fail!!!
I don't know from where i got idea to reduce some values from session, Magic.. it start working fine..
Now my question is- why this is happening? Is there any upper limit of values to be store in session in codeIgniter?
Explanation:
By default CodeIgniter stores the session data in a cookie, which has an upper limit of 2KB-4KB in size depending on browser.
If you are trying to store more than 4KB of data in the session you will start running into issues.
Solution:
The easiest solution is to store the session details in the DB.The CodeIgniter session documentation details the process for storing the session in the DB.it's a matter of setting up a table, and changing a couple of config parameters. Below are the changes you need to do-
Update below variable in Config file (application/config/config.php):