Better error message when config file can not be parsed
- shorter text - directly show errors in iframe instead saying user to load other page
This commit is contained in:
parent
cf905b6afe
commit
ee0b2fee37
@ -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) {
|
||||
|
||||
@ -8,8 +8,6 @@
|
||||
|
||||
require './libraries/vendor_config.php';
|
||||
|
||||
echo "Starting to parse config file...\n";
|
||||
|
||||
error_reporting(E_ALL);
|
||||
/**
|
||||
* Read config file.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user