I have a website hosted on CPanel (HostGator) written in PHP. I want my session to stay alive. For now, it seems to be cleared after about one hour. I have tried to set session.gc_probability = 0;
in php.ini
and just to make sure, I also do ini_set('session.gc_probability', 0);
before starting my session. But still, the session gets cleared after about one hour, and there are no errors in error_log
. I also tried to set a huge session.gc_maxlifetime
and it also does not change the time before the session gets cleared.
I can see on CPanel on the module MultiPHP INI Editor that my settings are well set. I don't understand why the session gets always cleared after about one hour. Should I try to delete the sessions files on the filesystem?