authentication failed * * @global string the MySQL error message PHP returns * @global string the connection type (persistent or not) * @global string the MySQL server port to use * @global string the MySQL socket port to use * @global array the current server settings * @global string the font face to use in case of failure * @global string the default font size to use in case of failure * @global string the big font size to use in case of failure * @global boolean tell the "PMA_mysqlDie()" function headers have been * sent * * @return boolean always true (no return indeed) * * @access public */ function PMA_auth_fails() { global $php_errormsg; global $connect_func, $server_port, $server_socket, $cfg; global $right_font_family, $font_size, $font_bigger; global $is_header_sent; if (PMA_mysql_error()) { $conn_error = PMA_mysql_error(); } else if (isset($php_errormsg)) { $conn_error = $php_errormsg; } else { $conn_error = 'Cannot connect: invalid settings.'; } /* Commented out by Nijel: This causes displaying login and password from * config when connection to MySQL server can't be established. (SQL parser * fails on this and then displays it as wrong SQL. */ /* $local_query = $connect_func . '(' . $cfg['Server']['host'] . $server_port . $server_socket . ', ' . $cfg['Server']['user'] . ', ' . $cfg['Server']['password'] . ')';*/ $local_query = ''; // Defines the charset to be used header('Content-Type: text/html; charset=' . $GLOBALS['charset']); ?> <?php echo $GLOBALS['strAccessDenied']; ?>


' . $GLOBALS['strAccessDeniedExplanation'] . '

' . "\n"; PMA_mysqlDie($conn_error, $local_query, FALSE); return TRUE; } // end of the 'PMA_auth_fails()' function ?>