Welcome Guest, Not a member yet? Register   Sign In
Configuring the session to die on browser close OR live 1800
#1

[eluser]tobefound[/eluser]
Hi,

I have this in my config.php:

Code:
$config['sess_cookie_name']   = 'ci_session';
$config['sess_expiration']    = 7200;
$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;

The way I understand things, CI can never expire a session (deleting the session cookie is sufficient) because setting 'sess_expiration' to 0 means 'live for 2 years'. Weird...

A common scenario would be to expire a session after say 1800 seconds (half hour) OR expire when the browser closes. How can such a goal be achieved?

/Tommy


Messages In This Thread
Configuring the session to die on browser close OR live 1800 - by El Forum - 02-09-2010, 10:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB