Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Čihař <mcihar@suse.cz>2011-06-22 11:29:14 +0400
committerMichal Čihař <mcihar@suse.cz>2011-06-22 11:29:14 +0400
commitee0b2fee370e044c960914cb97253cf17d8024fa (patch)
treea5211effe996463733aaed8427389f6f63348e3c
parentcf905b6afe6982d8fdbe5e459f213798f03a521c (diff)
Better error message when config file can not be parsed
- shorter text - directly show errors in iframe instead saying user to load other page
-rw-r--r--libraries/common.inc.php13
-rw-r--r--show_config_errors.php2
2 files changed, 5 insertions, 10 deletions
diff --git a/libraries/common.inc.php b/libraries/common.inc.php
index 0887db824f..5bdb45e51b 100644
--- a/libraries/common.inc.php
+++ b/libraries/common.inc.php
@@ -584,14 +584,11 @@ require './libraries/select_lang.lib.php';
* this check is done here after loading language files to present errors in locale
*/
if ($GLOBALS['PMA_Config']->error_config_file) {
- $error = __('phpMyAdmin was unable to read your configuration file!<br />This might happen if PHP finds a parse error in it or PHP cannot find the file.<br />Please call the configuration file directly using the link below and read the PHP error message(s) that you receive. In most cases a quote or a semicolon is missing somewhere.<br />If you receive a blank page, everything is fine.')
- . '<br /><br />'
- . ($GLOBALS['PMA_Config']->getSource() == CONFIG_FILE ?
- '<a href="show_config_errors.php"'
- .' target="_blank">' . $GLOBALS['PMA_Config']->getSource() . '</a>'
- :
- '<a href="' . $GLOBALS['PMA_Config']->getSource() . '"'
- .' target="_blank">' . $GLOBALS['PMA_Config']->getSource() . '</a>');
+ $error = '<h1>' . __('Failed to to read configuration file') . '</h1>'
+ . _('This usually means there is a syntax error in it, please check any errors shown bellow.')
+ . '<br />'
+ . '<br />'
+ . '<iframe src="show_config_errors.php" />';
trigger_error($error, E_USER_ERROR);
}
if ($GLOBALS['PMA_Config']->error_config_default_file) {
diff --git a/show_config_errors.php b/show_config_errors.php
index 9024fec22d..3ef1764351 100644
--- a/show_config_errors.php
+++ b/show_config_errors.php
@@ -8,8 +8,6 @@
require './libraries/vendor_config.php';
-echo "Starting to parse config file...\n";
-
error_reporting(E_ALL);
/**
* Read config file.