Welcome Guest, Not a member yet? Register   Sign In
How to have a session that never expires ?
#1

Hello Dear CI Community,

I don't understand, i read the documentation and i set the sess_expiration on '0' as the doc said, but even with the tab always open in the browser (Chrome), the session never exceed 2 or 3 hours. After that time, the session file on the server is updated and the user data are removed... (i didn't define a save_path but it's automatically saved in the var/php folder of the server)

Here is my config code : 

PHP Code:
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 0;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE

PHP Code:
$config['cookie_prefix']    = '';
$config['cookie_domain']    = '.mydomain.com';
$config['cookie_path']        = '/';
$config['cookie_secure']    = FALSE;
$config['cookie_httponly']     = FALSE

Ideally i would have at least a session that doesn't expire as long as the tab is open and in the best way, i would have a running session even when the user is off, in order to avoid to ask him to relog each time he comes to the website. 

If you have any ideas, it will be great !!  Heart

Thanks a lot !!

Cheers.
Reply


Messages In This Thread
How to have a session that never expires ? - by Coool6 - 06-12-2018, 07:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB