diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-10-20 21:30:50 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-10-20 21:30:50 +0000 |
commit | 278e2dd3095b626c6acc413229cab59c39f45126 (patch) | |
tree | 2e849d17b955c24386422d9c8ac7e068b5979f72 /includes/database.mysqli.inc | |
parent | 3fad92fc59464454d56f331487f99c474c23e0ec (diff) | |
download | brdo-278e2dd3095b626c6acc413229cab59c39f45126.tar.gz brdo-278e2dd3095b626c6acc413229cab59c39f45126.tar.bz2 |
- Add maintenance-page error screens when the php module for the dbtype is not loaded (just showed a blank screen before)
Diffstat (limited to 'includes/database.mysqli.inc')
-rw-r--r-- | includes/database.mysqli.inc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/includes/database.mysqli.inc b/includes/database.mysqli.inc index 779a4a909..f96f89659 100644 --- a/includes/database.mysqli.inc +++ b/includes/database.mysqli.inc @@ -21,6 +21,15 @@ * Note that mysqli does not support persistent connections. */ function db_connect($url) { + // Check if MySQLi support is present in PHP + if (!function_exists('mysqli_init')) { + drupal_maintenance_theme(); + drupal_set_title('PHP MySQL support not enabled'); + print theme('maintenance_page', '<p>We were unable to use the MySQL database because the MySQLi extension for PHP is not installed. Check your <code>PHP.ini</code> to see how you can enable it.</p> +<p>For more help, see the <a href="http://drupal.org/node/258">Installation and upgrading handbook</a>. If you are unsure what these terms mean you should probably contact your hosting provider.</p>'); + exit; + } + $url = parse_url($url); // Allow for non-standard MySQL port. |