How can I kill a PHP session after certain time?
Asked By
10 points
N/A
Posted on - 05/29/2015
![qa-featured](https://www.techyv.com/sites/default/users/superadmin/qa-featured-300x270.png)
I am wanting to kill the php sessions after certain time say for example after 20 minutes of inactivity. I don’t know much about SESSION.GC_MAXLIFETIME and SESSION.COOKIE_LIFETIME but I am also unsure about the reliability of the same. How to implement a session time of my own in PHP? How to avoid garbage collector automatically destroying my sessions? How to time stamp my sessions on my own so that I can keep track of last activity in th session so that I can kill th session if I detect that the programmed time out has happened.
![](https://techyv.com/sites/default/2016/10/techpedia_logo.png)