mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Updated
This commit is contained in:
parent
20c06a4beb
commit
0517e27f5a
@ -91,6 +91,13 @@ class sql_db
|
||||
{
|
||||
global $DBS;
|
||||
|
||||
// Check MySQL installed
|
||||
if (!function_exists('mysql_connect') || !extension_loaded('mysql'))
|
||||
{
|
||||
$this->log_error();
|
||||
error_exit("Error: {$this->engine} extension not installed");
|
||||
}
|
||||
|
||||
$this->cfg = array_combine($this->cfg_keys, $cfg_values);
|
||||
$this->slow_time = SQL_SLOW_QUERY_TIME;
|
||||
|
||||
|
@ -12,8 +12,6 @@ if (PHP_VERSION_ID < 50304) die('TorrentPier II requires PHP version 5.3.4+. You
|
||||
if (PHP_VERSION_ID >= 70000) die('TorrentPier II requires PHP version lower than PHP 7. Your PHP version ' . PHP_VERSION);
|
||||
// Magic quotes
|
||||
if (function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc()) die('Set: magic_quotes_gpc = Off');
|
||||
// MySQL
|
||||
if (!function_exists('mysql_connect') || !extension_loaded('mysql')) die('MySQL extension not installed');
|
||||
// JSON
|
||||
if (!function_exists('json_encode')) die('json_encode() function not exists');
|
||||
// getmypid
|
||||
|
@ -44,6 +44,17 @@ class sql_db
|
||||
{
|
||||
global $DBS;
|
||||
|
||||
// Check MySQL installed
|
||||
if (!function_exists('mysql_connect') || !extension_loaded('mysql'))
|
||||
{
|
||||
$init_error = "Error: {$this->engine} extension not installed";
|
||||
if (DBG_LOG)
|
||||
{
|
||||
dbg_log($init_error, "{$this->engine}-DB-INIT-FAIL_" . TIMENOW);
|
||||
}
|
||||
die($init_error);
|
||||
}
|
||||
|
||||
$this->cfg = array_combine($this->cfg_keys, $cfg_values);
|
||||
$this->dbg_enabled = (sql_dbg_enabled() || !empty($_COOKIE['explain']));
|
||||
$this->do_explain = ($this->dbg_enabled && !empty($_COOKIE['explain']));
|
||||
|
Loading…
Reference in New Issue
Block a user