ini_set('session.cookie_lifetime', 259200);
ini_set('session.gc_maxlifetime', 259200);
session_start();
I have the above bit of code included on every single page on my site. I want to keep the user logged in for three days after logging in, but if they visit the site before the expiry date, it keeps them alive for three more days. Basically, the session is kept alive three days from when they leave the site (and if they don't return within those three days).
I've noticed, however, that sessions are kept alive for about a day and then die despite the ini_set
I have above. I considered that perhaps it was my webhost's php.ini, but it also does this on my local machine.
Is there some other ini_set
call I can do to get my desired effect? These don't seem to work, although they do keep it alive for one day.