From 1b43fbe06c7fa7eb16abe5509ecc952ddaf7c5be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 17 Aug 2022 12:10:03 +0200 Subject: [PATCH] Move setting of gc_maxlifetime to initSession MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/base.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/base.php b/lib/base.php index c0aee6c528f..1fca124f072 100644 --- a/lib/base.php +++ b/lib/base.php @@ -445,7 +445,9 @@ class OC { die(); } + //try to set the session lifetime $sessionLifeTime = self::getSessionLifeTime(); + @ini_set('gc_maxlifetime', (string)$sessionLifeTime); // session timeout if ($session->exists('LAST_ACTIVITY') && (time() - $session->get('LAST_ACTIVITY') > $sessionLifeTime)) { @@ -717,9 +719,6 @@ class OC { $config->deleteAppValue('core', 'cronErrors'); } } - //try to set the session lifetime - $sessionLifeTime = self::getSessionLifeTime(); - @ini_set('gc_maxlifetime', (string)$sessionLifeTime); // User and Groups if (!$systemConfig->getValue("installed", false)) {