[eluser]Gonzo2[/eluser]
I am facing a DB Session issue. Here are my Config environment:
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 3600;
$config['sess_expire_on_close'] = TRUE;
$config['sess_encrypt_cookie'] = TRUE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = TRUE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 300;
Ok, The session are successfully getting stored into a database and when I use sess_destroy() at the time of logout it delete the record from the session table, but the problem is when I am using the option of
$config['sess_expire_on_close'] = TRUE it kills the session on browser window close but the record entry remains in the session table.
CI Session Wiki says:
Note: The Session class has built-in garbage collection which clears out expired sessions so you do not need to write your own routine to do it.
But, I am having left-over entries into the session table even after their expiry and only gets deleted when I use sess_destroy() not working for sess_expire_on_close.
Lots of garbage collection at session table, seem like I need to write a routine to purge the table for expired sessions.
What could be wrong here?
Gonzo