mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
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");
|
ini_set("error_log", $config["homedir"]."/pandora_console.log");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if mysqli is available
|
||||||
|
$config["mysqli"] = extension_loaded(mysqli);
|
||||||
|
|
||||||
$config['start_time'] = microtime (true);
|
$config['start_time'] = microtime (true);
|
||||||
|
|
||||||
$ownDir = dirname(__FILE__) . '/';
|
$ownDir = dirname(__FILE__) . '/';
|
||||||
|
@ -28,11 +28,9 @@ function mysql_connect_db($host = null, $db = null, $user = null, $pass = null,
|
|||||||
if ($port === null)
|
if ($port === null)
|
||||||
$port = $config["dbport"];
|
$port = $config["dbport"];
|
||||||
|
|
||||||
if ($config["mysqli"] === null && extension_loaded(mysqli)) {
|
// Check if mysqli is available
|
||||||
$config["mysqli"] = true;
|
if (!isset($config["mysqli"])) {
|
||||||
}
|
$config["mysqli"] = extension_loaded(mysqli);
|
||||||
else {
|
|
||||||
$config["mysqli"] = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Non-persistent connection: This will help to avoid mysql errors like "has gone away" or locking problems
|
// Non-persistent connection: This will help to avoid mysql errors like "has gone away" or locking problems
|
||||||
|
Loading…
x
Reference in New Issue
Block a user