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 ;-)

This commit is contained in:
Ralf Becker 2005-02-21 08:07:45 +00:00
parent f39a9d0835
commit 28b05351bc

View File

@ -1302,6 +1302,10 @@
if(empty($GLOBALS['phpgw_info']['server']['sessions_type'])) 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'); include_once(PHPGW_API_INC.'/class.sessions_'.$GLOBALS['phpgw_info']['server']['sessions_type'].'.inc.php');