This is probably a pretty simple question. I found dozens of these, asking how to generally shorten or extend the session lifetime in PHP. I know how to do this, my PHP script reads like this:
ini_set('session.gc_maxlifetime', 3600); session_set_cookie_params(3600); session_start();
This sets my sessions to timeout after 3600 seconds. And this is basically what happens when I start to open a website where I have to log in, I can work with it for exactly one hour, then all the session data is deleted, and I need to log in again.
However, this is not the behavior that I would expect. I want my sessions to disconnect after one hour of inactivity . Therefore, when I first open my site at 10:00, I will do something before 10:45, then it should time out at 11:45, and not at 11:00, as it is now.
Any suggestions to achieve this?
source share