|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #68127 Very short maxlifetime in default php.ini
Submitted: 2014-10-01 20:59 UTC Modified: 2015-12-16 01:02 UTC
Avg. Score:4.0 ± 0.8
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: atze_80 at web dot de Assigned:
Status: Open Package: *Configuration Issues
PHP Version: 5.6.0 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2014-10-01 20:59 UTC] atze_80 at web dot de
In the php.ini delivered with php source is the following setting

session.gc_maxlifetime = 1440

according to the documentation this value is in seconds, which means that the default session lifetime is just 24 minutes.

I cannot help myself but assume that there is a missing zero. A value of 14400 seconds is 4 hours which is more reasonable.


php.ini-maxlifetime-patch (last revision 2014-10-01 21:00 UTC by atze_80 at web dot de)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-10-03 10:05 UTC]
hi, the default value for this setting is the same since session gc was introduced back in '99.
maybe it would be appropriate to change the defaults (which should also include changing the hard coded default when no ini is present: but I think this would be better discussed on the mailing list, and having an RFC for changing this would be also reasonable.
 [2015-12-16 01:02 UTC]
1440 seconds may be too short for many sites. However, if session.gc_maxlifetime should have larger value, users should set larger value manually. Default values should be safe enough values. IMHO.

There are too many sites that do not use SSL currently. If vast majority of PHP sites use SSL, then we may consider to use larger value for session.gc_maxlifetime. Even if this became the case, 3600 seconds would be long enough. IMO.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Oct 24 04:01:23 2020 UTC