Skip to content

Instantly share code, notes, and snippets.

@joshdvir
Created June 19, 2014 08:11
Show Gist options
  • Save joshdvir/dba7a7f74b69a96fd758 to your computer and use it in GitHub Desktop.
Save joshdvir/dba7a7f74b69a96fd758 to your computer and use it in GitHub Desktop.
Custom Error Page in Drupal 7 if DB is down
@$mysqli = new mysqli(
$databases['default']['default']['host'],
$databases['default']['default']['username'],
$databases['default']['default']['password'],
$databases['default']['default']['database']
);
if (mysqli_connect_error()) {
require_once DRUPAL_ROOT . '/error.inc';
exit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment