Skip to content

Commit

Permalink
Add wrapper to show config errors even with no error reporting (RFE #…
Browse files Browse the repository at this point in the history
…1447173).
  • Loading branch information
nijel committed Mar 16, 2006
1 parent 2741f16 commit 7b48016
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ $Source$
* libraries/common.lib.php: Do not forget wrongly configured servers,
otherwise user gets warning only on first access (RFE #1451521).
* libraries/auth/config.auth.lib.php: Show possible error messages.
* show_config_errors.php, libraries/common.lib.php: Add wrapper to show
config errors even with no error reporting (RFE #1447173).

2006-03-15 Michal Čihař <[email protected]>
* libraries/export/htmlexcel.php: Fix output handling (bug #1450555).
Expand Down
10 changes: 7 additions & 3 deletions libraries/common.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2839,9 +2839,13 @@ function PMA_setCookie($cookie, $value, $default = null)
*/
if ($_SESSION['PMA_Config']->error_config_file) {
$GLOBALS['PMA_errors'][] = $strConfigFileError
.'<br /><br />'
.'<a href="' . $_SESSION['PMA_Config']->getSource() . '"'
.' target="_blank">' . $_SESSION['PMA_Config']->getSource() . '</a>';
. '<br /><br />'
. ($_SESSION['PMA_Config']->getSource() == './config.inc.php' ?
'<a href="show_config_errors.php"'
.' target="_blank">' . $_SESSION['PMA_Config']->getSource() . '</a>'
:
'<a href="' . $_SESSION['PMA_Config']->getSource() . '"'
.' target="_blank">' . $_SESSION['PMA_Config']->getSource() . '</a>');
}
if ($_SESSION['PMA_Config']->error_config_default_file) {
$GLOBALS['PMA_errors'][] = sprintf($strConfigDefaultFileError,
Expand Down
12 changes: 12 additions & 0 deletions show_config_errors.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/* $Id$ */
// vim: expandtab sw=4 ts=4 sts=4:

/* Simple wrapper just to enable error reporting and include config */

echo "Starting to parse config file...\n";

error_reporting(E_ALL);
require('./config.inc.php');

?>

0 comments on commit 7b48016

Please sign in to comment.