Welcome Guest, Not a member yet? Register   Sign In
Session ID not regenerating
#1

Hey

I'm having problems with the session ID not regenerating. This is my config

Code:
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 60; // 15 minutes
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 30; // 5 minutes
$config['sess_regenerate_destroy'] = TRUE;

I set it to really short timeframes for experimentation. When I register a user, I set a session variable called user_id then load a different page. At registration the output for session variables is

Code:
session_id() = kvrphe8...
timestamp (from ci_sessions) = 1523413499
user_id = user87B...
If i wait exactly 40 seconds then query these same variables via ajax (without reloading the page), I get

Code:
session_id() = kvrphe8...
timestamp (from ci_sessions) = 1523413499
user_id =user87B...

Why isn't the session id regenerating after 30 seconds? If i wait more than 60 seconds the session is destroyed as expected, and the session_id() changes. But shouldn't it change every 30 seconds in this instance? I would also expect the session to be destroyed at 30 seconds because sess_regenerate_destroy = TRUE, but that obviously isnt happening either.

Thanks
Reply


Messages In This Thread
Session ID not regenerating - by gloosemore - 04-10-2018, 07:32 PM
RE: Session ID not regenerating - by InsiteFX - 04-11-2018, 03:52 AM
RE: Session ID not regenerating - by Narf - 04-11-2018, 05:08 AM
RE: Session ID not regenerating - by dave friend - 04-11-2018, 12:24 PM
RE: Session ID not regenerating - by Narf - 04-12-2018, 03:56 AM
RE: Session ID not regenerating - by dave friend - 04-12-2018, 05:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB