1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-25 08:51:50 +02:00

More helpful message when MySQL crashes, with scope for changing

This commit is contained in:
e107steved
2008-08-08 20:16:22 +00:00
parent 393943265a
commit 04b78304e6
3 changed files with 71 additions and 12 deletions

View File

@@ -11,8 +11,8 @@ e107 website system
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/message_handler.php,v $
| $Revision: 1.2 $
| $Date: 2007-01-01 10:02:20 $
| $Revision: 1.3 $
| $Date: 2008-08-08 20:16:12 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -45,16 +45,23 @@ function show_emessage($mode, $message, $line = 0, $file = "") {
</div>";
}
if (class_exists('e107table')) {
$ns = new e107table;
if (class_exists('e107table'))
{
$ns = new e107table;
}
switch($mode) {
case "CRITICAL_ERROR":
switch($mode)
{
case "CRITICAL_ERROR" :
$message = $emessage[$message] ? $emessage[$message] : $message;
if (is_readable(e_THEME.'index.html'))
{
require_once(e_THEME.'index.html');
exit;
}
echo "<div style='text-align:center; font: 11px verdana, tahoma, arial, helvetica, sans-serif;'><b>CRITICAL_ERROR: </b><br />Line $line $file<br /><br />Error reported as: ".$message."</div>";
break;
case "MESSAGE":
case "MESSAGE":
if(strstr(e_SELF, "forum_post.php"))
{
return;

View File

@@ -4,8 +4,8 @@
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/lan_error.php,v $
| $Revision: 1.4 $
| $Date: 2008-07-25 20:12:31 $
| $Revision: 1.5 $
| $Date: 2008-08-08 20:16:22 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -42,7 +42,7 @@ define("LAN_ERROR_27", "[3]: Core settings saved - backup made active.");
define("LAN_ERROR_28", "[4]: No core backup found. Check that your database has valid content. If not, please run the <a href='".e_FILE."resetcore/resetcore.php'>Reset_Core</a> utility to rebuild your core settings. <br />After rebuilding your core please save a backup from the admin/sql screen.");
define("LAN_ERROR_29", "[5]: Field(s) have been left blank. Please resubmit the form and fill in the required fields.");
define("LAN_ERROR_30", "[6]: Unable to form a valid connection to mySQL. Please check that your e107_config.php contains the correct information.");
define("LAN_ERROR_31", "[7]: mySQL is running but database ({$mySQLdefaultdb}) couldn't be connected to.<br />Please check it exists and that your e107_config.php contains the correct information.");
define("LAN_ERROR_31", "[7]: mySQL is running but database ({$mySQLdefaultdb}) couldn't be connected to.<br />Please check it exists and that your configuration file contains the correct information.");
define("LAN_ERROR_32", "To complete the upgrade, copy the following text into your e107_config.php file:");
define("LAN_ERROR_33", "Processing error! Normally, I would redirect to the home page.");
@@ -51,8 +51,13 @@ define("LAN_ERROR_34", "Unknown error! Please inform the site administrator you
define('LAN_ERROR_35', 'Error 400 - Bad Request');
define('LAN_ERROR_36', 'There is a formatting error in the web page you are trying to access.');
define('LAN_ERROR_37', 'Error Icon');
define('LAN_ERROR_38', '');
define('LAN_ERROR_39', '');
define('LAN_ERROR_38', 'Sorry, but the site is unavailable due to a temporary fault');
define('LAN_ERROR_39', 'Please try again in a few minutes');
define('LAN_ERROR_40', 'If the problem persists, please contact the site administrator');
define('LAN_ERROR_41', 'The reported error is:');
define('LAN_ERROR_42', 'Additional error information: ');
define('LAN_ERROR_43', 'Site unavailable temporarily');
define('LAN_ERROR_44', 'Site logo');
?>

View File

@@ -0,0 +1,47 @@
<?php
/*
+ ----------------------------------------------------------------------------------------------+
| e107 website system : http://e107.org
| Steve Dunstan 2001-2002 : jalist@e107.org
| Released under the terms and conditions of the GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_themes/index.html,v $
| $Revision: 1.2 $
| $Date: 2008-08-08 20:16:12 $
| $Author: e107steved $
+-----------------------------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
// Parameters available: $line, $file, $message
echo "<?xml version='1.0' encoding='utf-8' ?>\n";
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n";
echo "<html xmlns='http://www.w3.org/1999/xhtml'".(defined("TEXTDIRECTION") ? " dir='".TEXTDIRECTION."'" : "").(defined("CORE_LC") ? " xml:lang=\"".CORE_LC."\"" : "").">\n";
echo "<head>
<title>".LAN_ERROR_43."</title>
<meta http-equiv='content-type' content='text/html; charset=utf-8' />
<meta http-equiv='content-style-type' content='text/css' />
<meta http-equiv='content-language' content='en' />
</head>\n
<body>\n
<div id='bodytext'>";
if (is_readable(e_IMAGE.'logo.png'))
{
echo "<img src='".e_IMAGE_ABS.'logo.png'."' alt='".LAN_ERROR_44."' />";
}
echo "<div style='text-align:center; font: 14px verdana, tahoma, arial, helvetica, sans-serif;'>";
echo LAN_ERROR_38.'<br />';
echo LAN_ERROR_39.'<br />';
echo LAN_ERROR_40.'<br /><br /><br /></div>';
echo "<div style='text-align:center; font: 12px verdana, tahoma, arial, helvetica, sans-serif;'>";
echo LAN_ERROR_41.'<br />';
echo "<b>CRITICAL_ERROR: </b><br />Line {$line} {$file}<br />
<br />".LAN_ERROR_42.$message."</div>\n";
echo "</div></body>\n</html>";
?>