Skip to content

Commit 1b43fbe

Browse files
committed
Move setting of gc_maxlifetime to initSession
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent 9e1d431 commit 1b43fbe

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/base.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,9 @@ public static function initSession() {
445445
die();
446446
}
447447

448+
//try to set the session lifetime
448449
$sessionLifeTime = self::getSessionLifeTime();
450+
@ini_set('gc_maxlifetime', (string)$sessionLifeTime);
449451

450452
// session timeout
451453
if ($session->exists('LAST_ACTIVITY') && (time() - $session->get('LAST_ACTIVITY') > $sessionLifeTime)) {
@@ -717,9 +719,6 @@ public static function init() {
717719
$config->deleteAppValue('core', 'cronErrors');
718720
}
719721
}
720-
//try to set the session lifetime
721-
$sessionLifeTime = self::getSessionLifeTime();
722-
@ini_set('gc_maxlifetime', (string)$sessionLifeTime);
723722

724723
// User and Groups
725724
if (!$systemConfig->getValue("installed", false)) {

0 commit comments

Comments
 (0)