Jump to content

Avoid PHP Sessions expiring


hoopz

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.