CI Sessions config question |
Hey Guys,
I seem to have an issue with my Sessions config where it isn't doing what I am anticipating. I am trying to set sessions to never expire; however, they all seem to expire within a few days. I am using the database driver and the oldest timestamp on any ci_session record is ~5 days ago. (the table has just over a million records in it currently). Below is my settings and any insight would be much appreciated. PHP Code: $config['sess_driver'] = 'database';
1) sess_time_to_update has nothing to do with how long the session is supposed to last, so you should reset that value.
2) sess_use_database will have no effect in CI 3.0. 3) Everything else looks right, and that your sessions should last 5 years. 4) If it's not a bug in your code, then perhaps a bug in CI's garbage collection?
Thanks for the help. I'm not cleaning up any old sessions in my code (that I know of).
Also thanks for the help on those other settings, I knew they were kind of a mix from CI 2. and 3. I will clean those up. Any idea where the CI garbage collection happens? I'm curious to have a look through it.
For the database driver, garbage collection is done in the gc method, near line 330 of system/libraries/Session/drivers/Session_database.php
|
Welcome Guest, Not a member yet? Register Sign In |