Ticket #2953: mythweb-dl.diff
File mythweb-dl.diff, 2.1 KB (added by , 17 years ago) |
---|
-
includes/objects/Database_mysql.php
43 43 * @param string $port Port or socket address to connect to 44 44 /**/ 45 45 function __construct($db_name, $login, $password, $server='localhost', $port=NULL, $options=NULL) { 46 // Attempt to make sure the extension is loaded 47 if (!extension_loaded('mysql')) { 48 // This function is deprecated as of php5, so we see if we can use it 49 if (function_exists('dl')) { 50 // Attempt to allow dl to be used 51 ini_set('enable_dl', TRUE); 52 if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') 53 dl('php_mysql.dll'); 54 else 55 dl('mysql.so'); 56 } 57 } 46 58 // Connect to the database 47 59 $this->dbh = @mysql_connect($port ? "$server:$port" : $server, $login, $password) 48 60 or $this->error("Can't connect to the database server."); -
includes/objects/Database_mysqli_compat.php
50 50 * @param string $port Port or socket address to connect to 51 51 /**/ 52 52 function __construct($db_name, $login, $password, $server='localhost', $port=NULL) { 53 // Attempt to make sure the extension is loaded 54 if (!extension_loaded('mysql')) { 55 // This function is deprecated as of php5, so we see if we can use it 56 if (function_exists('dl')) { 57 // Attempt to allow dl to be used 58 ini_set('enable_dl', TRUE); 59 if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') 60 dl('php_mysql.dll'); 61 else 62 dl('mysql.so'); 63 } 64 } 53 65 // Connect to the database 54 66 $this->dbh = @mysqli_connect($server, $login, $password, NULL, $port) 55 67 or $this->error("Can't connect to the database server.");