From 28b05351bc4d3bd33aa03bb8e0856895c78ea255 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 21 Feb 2005 08:07:45 +0000 Subject: [PATCH] fallback to db sessions if php's session extension is not loadable, atm. you get cryptic errors, bugs in the bugtracker and mails on the list ;-) --- phpgwapi/inc/class.sessions.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.sessions.inc.php b/phpgwapi/inc/class.sessions.inc.php index 2f06aea02f..695a2c746d 100644 --- a/phpgwapi/inc/class.sessions.inc.php +++ b/phpgwapi/inc/class.sessions.inc.php @@ -1302,6 +1302,10 @@ if(empty($GLOBALS['phpgw_info']['server']['sessions_type'])) { - $GLOBALS['phpgw_info']['server']['sessions_type'] = 'db'; + $GLOBALS['phpgw_info']['server']['sessions_type'] = 'php4'; // the more performant default + } + if ($GLOBALS['phpgw_info']['server']['sessions_type'] == 'php4' && !extension_loaded('session') && !@dl('session')) + { + $GLOBALS['phpgw_info']['server']['sessions_type'] = 'db'; // fallback if we have no php4 sessions support } include_once(PHPGW_API_INC.'/class.sessions_'.$GLOBALS['phpgw_info']['server']['sessions_type'].'.inc.php');