CodeIgniter session expires fast

0

I made a control panel for a client and in that panel my client can edit the products of the site. After the client Edit a product and click Save , when the client will try to edit more fields the system redirects to the login page, ie, the session expires because when there is no session the system redirects to the login page. Sometimes the client browsing the control panel in just over 2 minutes it redirects to the login page. Below the session settings of the file application/config.php

$config['sess_cookie_name']     = 'ci_session';
$config['sess_expiration']      = 0;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie']  = FALSE;
$config['sess_use_database']    = FALSE;
$config['sess_table_name']      = 'ci_sessions';
$config['sess_match_ip']        = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update']  = 86400;
    
asked by anonymous 23.10.2015 / 19:08

1 answer

0

Try to set the session to a very large number, instead of using zero. Try:

time()+(3600*24*365*5)

or

time()+157680000;

This session should last about 5 years.

    
23.10.2015 / 19:35