PHP - Set session during using session.gc_maxlifetime

by
Jeremy Canfield |
Updated: February 15 2022
| PHP articles
Each session has a duration. By default, the duration is 1,440 seconds, which is 24 minutes.
To increase or decrease the session duration, adjust the session.gc_maxlifetime value in your /etc/php.ini file. For example, to set the session duration to 3600 minutes, which is 1 hour. Restart the web server and then refresh your phpinfo.php web page to ensure session.gc_maxlifetime has changed.
session.gc_maxlifetime = 3600
Did you find this article helpful?
If so, consider buying me a coffee over at