Created
June 19, 2014 08:11
-
-
Save joshdvir/dba7a7f74b69a96fd758 to your computer and use it in GitHub Desktop.
Custom Error Page in Drupal 7 if DB is down
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@$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