Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Codeigniter logging users out at random?

I'm building an application using Codeigniter 3, but users keep getting logged out by random. I thought it might be an issue with using AJAX, as I've read that was a bit buggy, but it happens just randomly while browsing etc, and not any specific time as it can happen repeatedly over a few minutes or not for a while.

I am using ion_auth plugin for authentication etc.

My sessions are stored in the database, Here is the config into from CI:

//$config['sess_driver'] = 'files';
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
//$config['sess_save_path'] = '/home/slight/system/cache/';
$config['sess_save_path'] = 'ci_sessions';
$config['sess_match_ip'] = TRUE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

How can I even debug this? What can be causing it? What can I check for?

like image 726
frobak Avatar asked Nov 09 '22 06:11

frobak


1 Answers

You might have to try $config['sess_match_ip'] = FALSE;

like image 153
Bishweswar Mondal Avatar answered Nov 15 '22 12:11

Bishweswar Mondal