From 845ff1c17f9b03d0ff20194ef63b838da3622397 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 26 Sep 2006 14:09:05 +0000 Subject: - Patch #85123 by gerd: set proper HTTP headers. --- includes/database.mysql.inc | 1 + includes/database.mysqli.inc | 1 + includes/database.pgsql.inc | 1 + 3 files changed, 3 insertions(+) (limited to 'includes') diff --git a/includes/database.mysql.inc b/includes/database.mysql.inc index 421ccbeb5..262a28c1c 100644 --- a/includes/database.mysql.inc +++ b/includes/database.mysql.inc @@ -87,6 +87,7 @@ function db_connect($url) { // Show error screen otherwise drupal_maintenance_theme(); + drupal_set_header('HTTP/1.1 503 Service Unavailable'); drupal_set_title('Unable to connect to database server'); print theme('maintenance_page', '

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.

diff --git a/includes/database.mysqli.inc b/includes/database.mysqli.inc index de2c36af8..dd647165e 100644 --- a/includes/database.mysqli.inc +++ b/includes/database.mysqli.inc @@ -73,6 +73,7 @@ function db_connect($url) { // Find all database connection errors and error 1045 for access denied for user account if (mysqli_connect_errno() >= 2000 || mysqli_connect_errno() == 1045) { drupal_maintenance_theme(); + drupal_set_header('HTTP/1.1 503 Service Unavailable'); drupal_set_title('Unable to connect to database server'); print theme('maintenance_page', '

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.

diff --git a/includes/database.pgsql.inc b/includes/database.pgsql.inc index a4b7301d4..f1500c8e8 100644 --- a/includes/database.pgsql.inc +++ b/includes/database.pgsql.inc @@ -84,6 +84,7 @@ function db_connect($url) { $connection = @pg_connect($conn_string); if (!$connection) { drupal_maintenance_theme(); + drupal_set_header('HTTP/1.1 503 Service Unavailable'); drupal_set_title('Unable to connect to database'); print theme('maintenance_page', '

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.

-- cgit v1.2.3