function check_session_save_path() { global $errors; if (ini_get('session.save_handler') == 'files') { $save_path = ini_get('session.save_path'); // check if we can check it. The session.save_path can be outside // the open_basedir paths. $open_basedir = ini_get('open_basedir'); if (empty($open_basedir)) { if (!is_dir($save_path)) { $errors .= "The directory '{$save_path}' does not exist or PHP is not allowed to access it (check open_basedir entry in php.ini).\n"; } else { if (!TikiInit::is_writeable($save_path)) { $errors .= "The directory '{$save_path}' is not writeable.\n"; } } } if ($errors) { $save_path = TikiInit::tempdir(); if (is_dir($save_path) && TikiInit::is_writeable($save_path)) { ini_set('session.save_path', $save_path); $errors = ''; } } } }