setting the session.save_path to /tmp only for session.save_handler=files and !is_writable(session.save_path)

This commit is contained in:
Ralf Becker
2008-03-06 06:03:18 +00:00
parent 60a65bb560
commit a53b69af40
3 changed files with 13 additions and 3 deletions

View File

@@ -32,6 +32,10 @@ else
$_POST['ConfigLang'] = get_lang($charset);
create_http_enviroment(); // guessing the docroot etc.
if (ini_get('session.save_handler') == 'files' && !is_writable(ini_get('session.save_path')) && is_dir('/tmp') && is_writable('/tmp'))
{
ini_set('session.save_path','/tmp'); // regular users may have no rights to apache's session dir
}
// setting up the $GLOBALS['egw_setup'] object AND including the header.inc.php if it exists
$GLOBALS['egw_info'] = array(
'flags' => array(