diff --git a/public/install/functions.php b/public/install/functions.php index ebc3c6bd..c795aee0 100644 --- a/public/install/functions.php +++ b/public/install/functions.php @@ -1,17 +1,18 @@ "7.4", + "minPhp" => "7.4", + "maxPhp" => "8.1", // This version is not supported "mysql" => "5.7.22", ]; function checkPhpVersion() { global $requirements; - if (version_compare(phpversion(), $requirements["php"], '>=')) { + if (version_compare(phpversion(), $requirements["minPhp"], '>=') && version_compare(phpversion(), $requirements["maxPhp"], '<')) { return "OK"; } return "not OK"; @@ -22,8 +23,7 @@ function checkWriteable() } function checkHTTPS() { - return - (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') + return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443; } @@ -84,7 +84,6 @@ function checkExtensions() array_push($not_ok, $ext); } return $not_ok; - } function setEnvironmentValue($envKey, $envValue) @@ -119,7 +118,6 @@ function getEnvironmentValue($envKey) return $value; - } @@ -133,14 +131,11 @@ function run_console($command) function wh_log($log_msg) { $log_filename = "log"; - if (!file_exists($log_filename)) - { + if (!file_exists($log_filename)) { // create directory/folder uploads. mkdir($log_filename, 0777, true); } - $log_file_data = $log_filename.'/log_' . date('d-M-Y') . '.log'; + $log_file_data = $log_filename . '/log_' . date('d-M-Y') . '.log'; // if you don't add `FILE_APPEND`, the file will be erased each time you add a log - file_put_contents($log_file_data, "[".date('h:i:s')."] " . $log_msg . "\n", FILE_APPEND); + file_put_contents($log_file_data, "[" . date('h:i:s') . "] " . $log_msg . "\n", FILE_APPEND); } - -?> diff --git a/public/install/index.php b/public/install/index.php index d2e4e37e..c15dfa63 100644 --- a/public/install/index.php +++ b/public/install/index.php @@ -69,7 +69,7 @@ if (!isset($_GET['step'])) {

">Write-permissions on .env-file

"> php - version: (required )

+ version: (minimum required )

"> mysql version: (minimum required )