fix: removed php-fpm requirement, added php-intl requirement, added php8.1 as unsupported
This commit is contained in:
parent
efcd557795
commit
5d32f2109c
|
@ -1,17 +1,18 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
$required_extentions = array("openssl", "gd", "mysql", "PDO", "mbstring", "tokenizer", "bcmath", "xml", "curl", "zip", "fpm");
|
$required_extentions = array("openssl", "gd", "mysql", "PDO", "mbstring", "tokenizer", "bcmath", "xml", "curl", "zip", "intl");
|
||||||
|
|
||||||
$requirements = [
|
$requirements = [
|
||||||
"php" => "7.4",
|
"minPhp" => "7.4",
|
||||||
|
"maxPhp" => "8.1", // This version is not supported
|
||||||
"mysql" => "5.7.22",
|
"mysql" => "5.7.22",
|
||||||
];
|
];
|
||||||
|
|
||||||
function checkPhpVersion()
|
function checkPhpVersion()
|
||||||
{
|
{
|
||||||
global $requirements;
|
global $requirements;
|
||||||
if (version_compare(phpversion(), $requirements["php"], '>=')) {
|
if (version_compare(phpversion(), $requirements["minPhp"], '>=') && version_compare(phpversion(), $requirements["maxPhp"], '<')) {
|
||||||
return "OK";
|
return "OK";
|
||||||
}
|
}
|
||||||
return "not OK";
|
return "not OK";
|
||||||
|
@ -22,8 +23,7 @@ function checkWriteable()
|
||||||
}
|
}
|
||||||
function checkHTTPS()
|
function checkHTTPS()
|
||||||
{
|
{
|
||||||
return
|
return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
|
||||||
(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
|
|
||||||
|| $_SERVER['SERVER_PORT'] == 443;
|
|| $_SERVER['SERVER_PORT'] == 443;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,6 @@ function checkExtensions()
|
||||||
array_push($not_ok, $ext);
|
array_push($not_ok, $ext);
|
||||||
}
|
}
|
||||||
return $not_ok;
|
return $not_ok;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setEnvironmentValue($envKey, $envValue)
|
function setEnvironmentValue($envKey, $envValue)
|
||||||
|
@ -119,7 +118,6 @@ function getEnvironmentValue($envKey)
|
||||||
|
|
||||||
|
|
||||||
return $value;
|
return $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -133,8 +131,7 @@ function run_console($command)
|
||||||
function wh_log($log_msg)
|
function wh_log($log_msg)
|
||||||
{
|
{
|
||||||
$log_filename = "log";
|
$log_filename = "log";
|
||||||
if (!file_exists($log_filename))
|
if (!file_exists($log_filename)) {
|
||||||
{
|
|
||||||
// create directory/folder uploads.
|
// create directory/folder uploads.
|
||||||
mkdir($log_filename, 0777, true);
|
mkdir($log_filename, 0777, true);
|
||||||
}
|
}
|
||||||
|
@ -142,5 +139,3 @@ function wh_log($log_msg)
|
||||||
// if you don't add `FILE_APPEND`, the file will be erased each time you add a 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ if (!isset($_GET['step'])) {
|
||||||
<p class="<?php print(checkWriteable() == true ? "ok" : "notok"); ?>">Write-permissions on .env-file</p>
|
<p class="<?php print(checkWriteable() == true ? "ok" : "notok"); ?>">Write-permissions on .env-file</p>
|
||||||
|
|
||||||
<p class="<?php print(checkPhpVersion() === "OK" ? "ok" : "notok"); ?>"> php
|
<p class="<?php print(checkPhpVersion() === "OK" ? "ok" : "notok"); ?>"> php
|
||||||
version: <?php echo phpversion(); ?> (required <?php echo $requirements["php"]; ?>)</p>
|
version: <?php echo phpversion(); ?> (minimum required <?php echo $requirements["minPhp"]; ?>)</p>
|
||||||
<p class="<?php print(getMySQLVersion() === "OK" ? "ok" : "notok"); ?>"> mysql
|
<p class="<?php print(getMySQLVersion() === "OK" ? "ok" : "notok"); ?>"> mysql
|
||||||
version: <?php echo getMySQLVersion(); ?> (minimum required <?php echo $requirements["mysql"]; ?>)</p>
|
version: <?php echo getMySQLVersion(); ?> (minimum required <?php echo $requirements["mysql"]; ?>)</p>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue