hoopz Posted April 3, 2007 Share Posted April 3, 2007 Scenario: I am on a server that set the session.gc_maxlifetime to 1440. My host does not allow users to modify the php.ini file. Issue: I am building a web app which uses sessions to manage logins. Every time a user wants to enter a sensitive area, it checks for $_SESSION['user']. The problem is because of the above setting, my users get logged off every 24 minutes. Is there a way to avoid this? I'd like my users to stay logged in even if the session expires and perhaps automatically create a new session when the old expires? Thanks, H Link to comment https://forums.phpfreaks.com/topic/45467-avoid-php-sessions-expiring/ Share on other sites More sharing options...
papaface Posted April 3, 2007 Share Posted April 3, 2007 Cookies Link to comment https://forums.phpfreaks.com/topic/45467-avoid-php-sessions-expiring/#findComment-220751 Share on other sites More sharing options...
hoopz Posted April 3, 2007 Author Share Posted April 3, 2007 Great, thanks! From what I've been reading, I had a feeling cookies would solve this. Thanks for confirming it! Link to comment https://forums.phpfreaks.com/topic/45467-avoid-php-sessions-expiring/#findComment-220757 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.