mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
Fix session.gc_maxlifetime being set to a lower value than specified in php.ini
This commit is contained in:
parent
93e0e55aaa
commit
f8f929137c
1 changed files with 1 additions and 1 deletions
|
|
@ -75,7 +75,7 @@ class Session
|
||||||
// Set session parameters.
|
// Set session parameters.
|
||||||
list($lifetime, $refresh_interval, $domain, $path, $secure, $httponly, $samesite) = self::_getParams();
|
list($lifetime, $refresh_interval, $domain, $path, $secure, $httponly, $samesite) = self::_getParams();
|
||||||
$alt_domain = $domain ?: preg_replace('/:\\d+$/', '', strtolower($_SERVER['HTTP_HOST'] ?? ''));
|
$alt_domain = $domain ?: preg_replace('/:\\d+$/', '', strtolower($_SERVER['HTTP_HOST'] ?? ''));
|
||||||
ini_set('session.gc_maxlifetime', $lifetime > 0 ? $lifetime : 28800);
|
ini_set('session.gc_maxlifetime', $lifetime > 0 ? $lifetime : max(28800, intval(ini_get('session.gc_maxlifetime'))));
|
||||||
ini_set('session.use_cookies', 1);
|
ini_set('session.use_cookies', 1);
|
||||||
ini_set('session.use_only_cookies', 1);
|
ini_set('session.use_only_cookies', 1);
|
||||||
ini_set('session.use_strict_mode', 1);
|
ini_set('session.use_strict_mode', 1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue