When storing the session in the database via
$config['sess_use_database'] = TRUE;
Is the size of the data limited to the size of the user_data field which is TEXT … ? Not 4kb like a normal cookie.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To further clarify my comment above, when you elect to save the session data in a database, CodeIgniter doesn’t set a cookie (other than the session id of course) but saves all of the information that it would have set in a cookie in your database.
If you have a look at the
sess_writein theSessionclass located in./system/libraries/, if you have enabled the use of a database, you’ll see that it serializes the data usingserializeand saves it directly to the database. There is no restriction on length imposed by CodeIgniter when saving to a database.For your convenience, here’s a link to the source code: https://bitbucket.org/ellislab/codeigniter/src/fe2247a927ab/system/libraries/Session.php#cl-252.
The only restriction is set by the field you chose to use to save the data in your database. For more information on the data type storage requirements of MySQL, read this.