From 0bc71915ec346ec983ec1717fac60ea639df5066 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 25 Jun 2004 04:32:45 +0000 Subject: [PATCH] Check for missing mysql functions, give nice error message if they are missing rather than a blank page --- includes/Database.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/includes/Database.php b/includes/Database.php index 134d53b3cb..a103e32e15 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -89,6 +89,12 @@ class Database { { global $wgEmergencyContact; + # Test for missing mysql.so + # Otherwise we get a suppressed fatal error, which is very hard to track down + if ( !function_exists( 'mysql_connect' ) ) { + die( "MySQL functions missing, have you compiled PHP with the --with-mysql option?\n" ); + } + $this->close(); $this->mServer = $server; $this->mUser = $user; -- 2.20.1