diff --git a/libraries/auth/http.auth.lib.php b/libraries/auth/http.auth.lib.php index 7fe0ac43f..601040f06 100644 --- a/libraries/auth/http.auth.lib.php +++ b/libraries/auth/http.auth.lib.php @@ -188,9 +188,23 @@ function PMA_auth_set_user() */ function PMA_auth_fails() { - PMA_auth(); + if (PMA_DBI_getError() && $GLOBALS['errno'] != 1045) { + $conn_error = PMA_sanitize(PMA_DBI_getError()); + header('Content-Type: text/html; charset=' . $GLOBALS['charset']); + $page_title = 'phpMyAdmin ' . PMA_VERSION; + require './libraries/header_meta_style.inc.php'; + + echo '

' . $GLOBALS['strError'] . '

' . "\n"; + echo $conn_error . '
' . "\n"; + // no footer here, would not make sense + echo '' . "\n"; + // exit immediately to avoid warnings from the db library + exit; + } else { + PMA_auth(); + return true; + } - return true; } // end of the 'PMA_auth_fails()' function ?>