Skip to content
This repository has been archived by the owner on Aug 25, 2019. It is now read-only.

Commit

Permalink
config.php error for install
Browse files Browse the repository at this point in the history
  • Loading branch information
dietrichm committed Apr 12, 2011
1 parent 4b6ef8b commit 9661903
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sources/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
if ( file_exists($config_file) )
require($config_file);
else
trigger_error('config.php does not exist! Please rename config.php-dist to config.php.', E_USER_ERROR);
trigger_error('config.php does not exist!', E_USER_ERROR);

//
// Define some constants
Expand Down
6 changes: 4 additions & 2 deletions sources/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -717,17 +717,19 @@ function usebb_die($errno, $error, $file, $line) {

//
// Installation note if
// - config.php does not exist
// - error "'install' must be removed"
// - mysql*() error "Access denied for user"
// - sql error "Table 'x' doesn't exist" or "Access denied for user"
//
if ( strpos($error, '\'install\' must be removed') !== false
if ( strpos($error, 'config.php does not exist') !== false
|| strpos($error, '\'install\' must be removed') !== false
|| ( !strncmp($error, 'mysql', 5) && strpos($error, 'Access denied for user') !== false )
|| ( $errtype == 'SQL_ERROR' && preg_match("#(?:Table '.+' doesn't exist|Access denied for user)#i", $error) ) ) {

$html_msg .= '
<p><strong>UseBB may not have been installed yet.</strong></p>
<p>If this is the case and you are the owner of this board, please see <a href="docs/index.html">docs/index.html</a> for installation instructions.</p>
<p>If this is the case and you are the owner of this board, please <a href="docs/index.html">see docs/index.html for <strong>installation instructions</strong></a>.</p>
<p>Otherwise, please report this error to the owner.</p>';

} else {
Expand Down

0 comments on commit 9661903

Please sign in to comment.