Index: wp-settings.php
===================================================================
--- wp-settings.php	(revision 3003)
+++ wp-settings.php	(working copy)
@@ -34,9 +34,22 @@
 if ( !(phpversion() >= '4.1') )
 	die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.1' );
 
-if ( !extension_loaded('mysql') )
-	die( 'Your PHP installation appears to be missing the MySQL which is required for WordPress.' );
-
+if ( !extension_loaded('mysql') ) {
+	if(version_compare(phpversion(), '5.0' '>=') || ini_get('safe_mode') == true)
+		die('Your PHP installation appears to be missing the mysql module which is required for WordPress.');
+	if(defined('PHP_SHLIB_SUFFIX'))
+		$prefix = (PHP_SHLIB_SUFFIX == 'dll') ? 'php_' : '';
+	else {
+		if(strtolower(substr(PHP_OS, 0, 3)) == 'win') {
+			$prefix = 'php_';
+			define('PHP_SHLIB_SUFFIX', 'dll');
+		} else
+			define('PHP_SHLIB_SUFFIX', 'so');
+	}
+	if(!dl($prefix . 'mysql.' . PHP_SHLIB_SUFFIX))
+		die( 'Your PHP installation appears to be missing the MySQL which is required for WordPress.' );
+}
+	
 function timer_start() {
 	global $timestart;
 	$mtime = explode(' ', microtime() );

