PHP sessions expire after X minutes - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: PHP sessions expire after X minutes (/showthread.php?tid=73501) |
PHP sessions expire after X minutes - peter - 05-01-2019 Hello, Since few days, I have a problem with my sessions with codeigniter. They expire after approximately 16/17 minutes. Nothing change in my code and everything was working good before. Sessions are generated like this : PHP Code: $this->session->set_userdata('user', $username); My autoload.php : PHP Code: $autoload['libraries'] = array('database', 'session'); My config.php : PHP Code: $config['sess_driver'] = 'files'; My phpinfo (PHP Version 7.2.17) : I guess there is a problem with the my config server. Do you have any idea ? Thank you RE: PHP sessions expire after X minutes - adamoli - 05-02-2019 Since your sess_save_path is set to NULL in your config, the sessions are being stored in the path defined by php settings (session.save_path). You may consider changing this to a path you control and have access to. There may be some server process cleaning this folder periodically. I would set sess_expiration and sess_time_to_update to 0 for testing purposes, and change the sess_cookie_name to something else. Also, check your cookie settings as these may also affect session behavior. |