Index: includes/database.mysql.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/database.mysql.inc,v retrieving revision 1.79 diff -u -p -r1.79 database.mysql.inc --- includes/database.mysql.inc 29 Aug 2007 18:38:55 -0000 1.79 +++ includes/database.mysql.inc 25 Sep 2007 17:03:06 -0000 @@ -89,10 +89,16 @@ function db_connect($url) { drupal_maintenance_theme(); drupal_set_header('HTTP/1.1 503 Service Unavailable'); drupal_set_title('Unable to connect to database server'); + if (ini_get('display_errors')) { + $db_connection_error_message = '
The MySQL error was: '. theme('placeholder', mysql_error()) .'.
+Currently, the username is '. theme('placeholder', $url['user']) .' and the database server is '. theme('placeholder', $url['host']) .'.
'; + } + else { + $db_connection_error_message = 'To display more details about the MySQL error, the PHP setting display_errors must be on. You can change it by editing your settings.php configuration file in Drupal.
If you still have to install Drupal, proceed to the installation page.
If you have already finished installed Drupal, this either means that the username and password information in your settings.php 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.
The MySQL error was: '. theme('placeholder', mysql_error()) .'.
-Currently, the username is '. theme('placeholder', $url['user']) .' and the database server is '. theme('placeholder', $url['host']) .'.
+'. $db_connection_error_message .'The MySQL error was: '. theme('placeholder', mysql_error($connection)) .'.
+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']) .'.
'; + } + else { + $db_connection_error_message = 'To display more details about the MySQL error, the PHP setting display_errors must be on. You can change it by editing your settings.php configuration file in Drupal.
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.
-The MySQL error was: '. theme('placeholder', mysql_error($connection)) .'.
-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']) .'.
+'. $db_connection_error_message .'The MySQL error was: '. theme('placeholder', mysqli_connect_error()) .'.
+Currently, the username is '. theme('placeholder', $url['user']) .' and the database server is '. theme('placeholder', $url['host']) .'.
'; + } + else { + $db_connection_error_message = 'To display more details about the MySQL error, the PHP setting display_errors must be on. You can change it by editing your settings.php configuration file in Drupal.
If you still have to install Drupal, proceed to the installation page.
If you have already finished installed Drupal, this either means that the username and password information in your settings.php 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.
The MySQL error was: '. theme('placeholder', mysqli_connect_error()) .'.
-Currently, the username is '. theme('placeholder', $url['user']) .' and the database server is '. theme('placeholder', $url['host']) .'.
+'. $db_connection_error_message .'The MySQL error was: '. theme('placeholder', mysqli_connect_error()) .'.
+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']) .'.
'; + } + else { + $db_connection_error_message = 'To display more details about the MySQL error, the PHP setting display_errors must be on. You can change it by editing your settings.php configuration file in Drupal.
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.
-The MySQL error was: '. theme('placeholder', mysqli_connect_error()) .'.
-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']) .'.
+'. $db_connection_error_message .'The PostgreSQL error was: '. theme('placeholder', decode_entities($php_errormsg)) .'
+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']) .'.
'; + } + else { + $db_connection_error_message = 'To display more details about the PostgreSQL error, the PHP setting display_errors must be on. You can change it by editing your settings.php configuration file in Drupal.
If you still have to install Drupal, proceed to the installation page.
If you have already finished installed Drupal, this either means that the username and password information in your settings.php file is incorrect or that we can\'t connect to the PostgreSQL database server. This could mean your hosting provider\'s database server is down.
The PostgreSQL error was: '. theme('placeholder', decode_entities($php_errormsg)) .'
-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']) .'.
+'. $db_connection_error_message .'