[eluser]bikuta[/eluser]
For some reason my site does seem to want to remember session data for some users.i.e., they log in and see the home page, but once they click on another link, they are immediately logged out, i.e., they get redirected to the login page.
This has not been happening for me and none of our testing have encountered this. This also affects both FF and IE.
Any ideas what it could be? What kind of things should I check?
This is what my session variables look like:
Code:
$config['sess_cookie_name'] = '_session';
$config['sess_expiration'] = -1;
$config['sess_encrypt_cookie'] = TRUE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = '_sessions';
$config['sess_match_ip'] = TRUE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 300;
Expiration is -1 because I used the mod to expire cookies on browser close. I'm using CI 1.6.3
I also have this check in each of my controllers:
Code:
if ((time() - $this->session->userdata('last_activity')) > 3600) {
$this->session->sess_destroy();
redirect('');
}
This is to so that they can't keep the session open by leaving their window open.