Check for missing mysql functions, give nice error message if they are missing rather...
authorTim Starling <tstarling@users.mediawiki.org>
Fri, 25 Jun 2004 04:32:45 +0000 (04:32 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Fri, 25 Jun 2004 04:32:45 +0000 (04:32 +0000)
includes/Database.php

index 134d53b..a103e32 100644 (file)
@@ -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;