summaryrefslogtreecommitdiff
path: root/includes/database.mysqli.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-09-26 14:09:05 +0000
committerDries Buytaert <dries@buytaert.net>2006-09-26 14:09:05 +0000
commit845ff1c17f9b03d0ff20194ef63b838da3622397 (patch)
treef0617a5f822e850e1a0f41edf44540c6da45ad54 /includes/database.mysqli.inc
parent030f9741b7e21c44f5c054dbc3b5649e08f1fa47 (diff)
downloadbrdo-845ff1c17f9b03d0ff20194ef63b838da3622397.tar.gz
brdo-845ff1c17f9b03d0ff20194ef63b838da3622397.tar.bz2
- Patch #85123 by gerd: set proper HTTP headers.
Diffstat (limited to 'includes/database.mysqli.inc')
-rw-r--r--includes/database.mysqli.inc1
1 files changed, 1 insertions, 0 deletions
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', '<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>