darkcarnival Posted January 4, 2007 Share Posted January 4, 2007 hi,I'm working on a admin cp script and i want to add a session that will hold a login detail but only for a limited time.like have it last only for 10 minutes for example.how do i do this?thanks :) Link to comment https://forums.phpfreaks.com/topic/32781-limit-on-session-time/ Share on other sites More sharing options...
trq Posted January 4, 2007 Share Posted January 4, 2007 Have a look at [url=http://php.net/ini_set]ini_set[/url] and its appendix. Link to comment https://forums.phpfreaks.com/topic/32781-limit-on-session-time/#findComment-152617 Share on other sites More sharing options...
PFMaBiSmAd Posted January 4, 2007 Share Posted January 4, 2007 If you modify the behavior of the sessions (through the garbage collection settings) to cause sessions to be deleted after a short time for the purpose of limiting login time, it will affect all of the sessions that you are using and if this is on shared hosting, it will (depending on if the session files share a common folder) affect the sessions of the other users.It would be much better to store a timestamp in the session when login occurs and then on any operation (page refresh, submit form, navigate to new page...), check how long ago login occurred and take appropriate action. Link to comment https://forums.phpfreaks.com/topic/32781-limit-on-session-time/#findComment-152625 Share on other sites More sharing options...
darkcarnival Posted January 4, 2007 Author Share Posted January 4, 2007 hmm ok I might give that a go. Link to comment https://forums.phpfreaks.com/topic/32781-limit-on-session-time/#findComment-152653 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.