bug #2186823 [core] bad session.save_path not detected

This commit is contained in:
Marc Delisle
2008-11-23 14:55:59 +00:00
parent 0078b7e664
commit 8ea82ad46c
2 changed files with 3 additions and 11 deletions

View File

@@ -10,6 +10,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
3.1.1.0 (not yet released) 3.1.1.0 (not yet released)
- patch #2242765 [core] Navi panel server links wrong, - patch #2242765 [core] Navi panel server links wrong,
thanks to Martin Stricker - martinstricker thanks to Martin Stricker - martinstricker
- bug #2186823 [core] bad session.save_path not detected
3.1.0.0 (not yet released) 3.1.0.0 (not yet released)
+ [auth] Support for Swekey hardware authentication, + [auth] Support for Swekey hardware authentication,

View File

@@ -68,19 +68,10 @@ $session_name = 'phpMyAdmin';
@session_name($session_name); @session_name($session_name);
if (! isset($_COOKIE[$session_name])) { if (! isset($_COOKIE[$session_name])) {
// on first start of session we will check for errors // on first start of session we check for errors
// f.e. session dir cannot be accessed - session file not created // f.e. session dir cannot be accessed - session file not created
ob_start();
$old_display_errors = ini_get('display_errors');
$old_error_reporting = error_reporting(E_ALL);
@ini_set('display_errors', 1);
$r = session_start(); $r = session_start();
@ini_set('display_errors', $old_display_errors); if ($r !== true || $GLOBALS['error_handler']->hasErrors()) {
error_reporting($old_error_reporting);
unset($old_display_errors, $old_error_reporting);
$session_error = ob_get_contents();
ob_end_clean();
if ($r !== true || ! empty($session_error)) {
setcookie($session_name, '', 1); setcookie($session_name, '', 1);
PMA_fatalError('strSessionStartupErrorGeneral'); PMA_fatalError('strSessionStartupErrorGeneral');
} }