diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-09-03 17:02:16 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-09-03 17:02:16 +0000 |
commit | 7a0d380f84402c7b62ab67e6627e3cb994be4265 (patch) | |
tree | af1e7346aadc82fc26ce3f1cde8ac110f92aba1c | |
parent | 51c2ab2e305eb1b3575633260e13dc440ace7669 (diff) | |
download | brdo-7a0d380f84402c7b62ab67e6627e3cb994be4265.tar.gz brdo-7a0d380f84402c7b62ab67e6627e3cb994be4265.tar.bz2 |
- Patch #172433 by webchick: better connection error reporting for mysqli.
-rw-r--r-- | includes/database.mysqli.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/database.mysqli.inc b/includes/database.mysqli.inc index 7ca01d15e..1b1af8cfe 100644 --- a/includes/database.mysqli.inc +++ b/includes/database.mysqli.inc @@ -89,7 +89,7 @@ function db_connect($url) { drupal_set_title('Unable to connect to database server'); print theme('maintenance_page', '<p>If you still have to install Drupal, proceed to the <a href="'. base_path() .'install.php">installation page</a>.</p> <p>If you have already finished installed Drupal, this either means that the username and password information in your <code>settings.php</code> file is incorrect or that we can\'t connect to the MySQL database server. This could mean your hosting provider\'s database server is down.</p> -<p>The MySQL error was: '. theme('placeholder', mysqli_error($connection)) .'.</p> +<p>The MySQL error was: '. theme('placeholder', mysqli_connect_error()) .'.</p> <p>Currently, the username is '. theme('placeholder', $url['user']) .' and the database server is '. theme('placeholder', $url['host']) .'.</p> <ul> <li>Are you sure you have the correct username and password?</li> @@ -104,7 +104,7 @@ function db_connect($url) { drupal_maintenance_theme(); drupal_set_title('Unable to select database'); print theme('maintenance_page', '<p>We were able to connect to the MySQL database server (which means your username and password are okay) but not able to select the database.</p> -<p>The MySQL error was: '. theme('placeholder', mysqli_error($connection)) .'.</p> +<p>The MySQL error was: '. theme('placeholder', mysqli_connect_error()) .'.</p> <p>Currently, the database is '. theme('placeholder', substr($url['path'], 1)) .'. The username is '. theme('placeholder', $url['user']) .' and the database server is '. theme('placeholder', $url['host']) .'.</p> <ul> <li>Are you sure you have the correct database name?</li> |