Fixed mysqli availability checker
This commit is contained in:
parent
8dbd12eac7
commit
8a2bd0f087
|
@ -68,6 +68,9 @@ else {
|
|||
ini_set("error_log", $config["homedir"]."/pandora_console.log");
|
||||
}
|
||||
|
||||
// Check if mysqli is available
|
||||
$config["mysqli"] = extension_loaded(mysqli);
|
||||
|
||||
$config['start_time'] = microtime (true);
|
||||
|
||||
$ownDir = dirname(__FILE__) . '/';
|
||||
|
|
|
@ -28,11 +28,9 @@ function mysql_connect_db($host = null, $db = null, $user = null, $pass = null,
|
|||
if ($port === null)
|
||||
$port = $config["dbport"];
|
||||
|
||||
if ($config["mysqli"] === null && extension_loaded(mysqli)) {
|
||||
$config["mysqli"] = true;
|
||||
}
|
||||
else {
|
||||
$config["mysqli"] = false;
|
||||
// Check if mysqli is available
|
||||
if (!isset($config["mysqli"])) {
|
||||
$config["mysqli"] = extension_loaded(mysqli);
|
||||
}
|
||||
|
||||
// Non-persistent connection: This will help to avoid mysql errors like "has gone away" or locking problems
|
||||
|
|
Loading…
Reference in New Issue