From eedb424418b9dd88f143fd65ed412e479155a8ee Mon Sep 17 00:00:00 2001 From: benjamin Date: Fri, 9 Feb 2024 17:36:22 +0000 Subject: [PATCH] use regular php session during CIVI SETUP --- CRM/Utils/System/Standalone.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CRM/Utils/System/Standalone.php b/CRM/Utils/System/Standalone.php index b05512cf1a0f..8013f2deee04 100644 --- a/CRM/Utils/System/Standalone.php +++ b/CRM/Utils/System/Standalone.php @@ -553,8 +553,12 @@ public function permissionDenied() { * Start a new session. */ public function sessionStart() { - $session_handler = new SessionHandler(); - session_set_save_handler($session_handler); + // during installation we can't use the session handler from the extension yet + // so we fall back to a default php session + if (!defined('CIVI_SETUP')) { + $session_handler = new SessionHandler(); + session_set_save_handler($session_handler); + } $session_max_lifetime = Civi::settings()->get('standaloneusers_session_max_lifetime') ?? 1440;