1
I have an application developed with Codeigniter, PHP and Mysql. The user’s session has always been treated according to the Codeigniter standard, but now I need the session to be more restrictive, operating in a manner analogous to an internet banking session, expiring in seven minutes (420 seconds) inactivity, and with each client request with the server these seven minutes are renewed.
I don’t know if natively just setting parameters Codeigniter supports this way of storing the session, but I haven’t been able to represent this way of working.
I don’t know if for this restriction level I need to reimplement some methods of the Ci_session class, or if it is enough to just set the CI parameters correctly?
If not, is there already a Codeigniter class or plugin that already has an activity like this implemented?
Example of how I am setting the parameters:
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 420;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 420;
$config['sess_storage'] = 'database';
$config['sess_database'] = 'default';
$config['sess_timeout'] = 7200;
$config['sess_destroy_on_timeout'] = FALSE;
$config['sess_update_interval'] = 180;
$config['sess_gc_probability'] = 10;
$config['sess_http_only'] = FALSE;
$config['sess_secure'] = FALSE;
$config['sess_forwarded_ip'] = FALSE;
because in the case of Codeigniter session_start() is not applicable. However I have already solved this problem in which I found the solution by simply reorganizing the configuration of the Codeigniter session.
– mayconfsbrito