From ec950f669906441df31dd6721219499d26fc69c7 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Thu, 18 Jan 2024 23:29:01 +0700 Subject: [PATCH] Update common.php --- common.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common.php b/common.php index 568d8002..bb73f500 100644 --- a/common.php +++ b/common.php @@ -2,6 +2,10 @@ if (isset($_REQUEST['GLOBALS'])) die(); +ignore_user_abort(true); +define('TIMESTART', utime()); +define('TIMENOW', time()); + // Check system requirements // PHP if (PHP_VERSION_ID < 50304) die('TorrentPier II requires PHP version 5.3.4+. Your PHP version ' . PHP_VERSION); @@ -9,7 +13,7 @@ if (PHP_VERSION_ID >= 70000) die('TorrentPier II requires PHP version lower than // Magic quotes if (function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc()) die('Set: magic_quotes_gpc = Off'); // MySQL -if (!extension_loaded('mysql')) die('MySQL extension not installed'); +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 @@ -21,10 +25,6 @@ if (!extension_loaded('bcmath')) die('BCMath extension not installed'); // Intl if (!extension_loaded('intl')) die('Intl extension not installed'); -ignore_user_abort(true); -define('TIMESTART', utime()); -define('TIMENOW', time()); - if (empty($_SERVER['REMOTE_ADDR'])) $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; if (empty($_SERVER['HTTP_USER_AGENT'])) $_SERVER['HTTP_USER_AGENT'] = ''; if (empty($_SERVER['HTTP_REFERER'])) $_SERVER['HTTP_REFERER'] = '';