Updated requirements in installer
This commit is contained in:
parent
c317ac3614
commit
06b843353a
|
@ -51,14 +51,6 @@ if(!empty($_POST["allow-metrics-checkbox"])) {
|
||||||
</script>
|
</script>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
|
|
||||||
<?php if (PHP_VERSION_ID < 70000) { ?>
|
|
||||||
<div class="text-center">
|
|
||||||
<div class="alert alert-danger" style="display: inline-block">
|
|
||||||
You are using PHP 5.6 which will not be supported in the future. Please upgrade.
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
|
||||||
|
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<div class="alert alert-success" style="display: inline-block">
|
<div class="alert alert-success" style="display: inline-block">
|
||||||
<strong>Success!</strong> Looks like you can run TS-website 2.0!
|
<strong>Success!</strong> Looks like you can run TS-website 2.0!
|
||||||
|
@ -92,10 +84,10 @@ function checkRequirements() {
|
||||||
|
|
||||||
// PHP version - 5.6.0 minimum, < 7 warning, > 7 ok
|
// PHP version - 5.6.0 minimum, < 7 warning, > 7 ok
|
||||||
{
|
{
|
||||||
$result = PHP_VERSION_ID < 50600 ? 2 : (PHP_VERSION_ID < 70000 ? 1 : 0);
|
$result = PHP_VERSION_ID < 70200 ? 2 : 0;
|
||||||
|
|
||||||
showCheckResult(
|
showCheckResult(
|
||||||
"PHP 5.6.0+ (7.0+ required soon)",
|
"PHP 7.2.0+",
|
||||||
$result,
|
$result,
|
||||||
"Current PHP version: " . phpversion()
|
"Current PHP version: " . phpversion()
|
||||||
);
|
);
|
||||||
|
@ -114,21 +106,6 @@ function checkRequirements() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// password_hash and password_verify
|
|
||||||
{
|
|
||||||
$result = PHP_VERSION_ID >= 50500 && password_verify(
|
|
||||||
"ayy-lmao-m88", password_hash("ayy-lmao-m88", PASSWORD_DEFAULT)
|
|
||||||
);
|
|
||||||
|
|
||||||
showCheckResult(
|
|
||||||
"password_hash & password_verify",
|
|
||||||
$result ? 0 : 2,
|
|
||||||
$result ?
|
|
||||||
"Functions exists and work" :
|
|
||||||
"Please make sure your PHP version supports BCRYPT and BLOWFISH"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
displayCategory("Extension checks");
|
displayCategory("Extension checks");
|
||||||
|
|
||||||
// Extensions check
|
// Extensions check
|
||||||
|
|
|
@ -25,8 +25,15 @@ if (!empty($_POST)) {
|
||||||
$tsServer = $tsNodeHost->serverGetByPort($queryserverport);
|
$tsServer = $tsNodeHost->serverGetByPort($queryserverport);
|
||||||
|
|
||||||
if(is_array($tsServer->getInfo())) {
|
if(is_array($tsServer->getInfo())) {
|
||||||
$utils = Config::i();
|
$tsVersion = $tsServer->getInfo()["virtualserver_version"];
|
||||||
|
$tsBuildNo = $tsVersion->section("[", 1)->filterDigits()->toInt();
|
||||||
|
|
||||||
|
if ($tsBuildNo < 1564054246) {
|
||||||
|
$errormessage =
|
||||||
|
'Your TeamSpeak server version is not supported.<br>' .
|
||||||
|
'Current version: ' . TeamSpeak3_Helper_Convert::versionShort($tsVersion) . ' (build ' . $tsBuildNo . ')' . '<br>' .
|
||||||
|
'Supported versions: 3.10.0 (build 1564054246) and newer';
|
||||||
|
} else {
|
||||||
$configdata = [
|
$configdata = [
|
||||||
"query_hostname" => $queryhostname,
|
"query_hostname" => $queryhostname,
|
||||||
"query_port" => $queryport,
|
"query_port" => $queryport,
|
||||||
|
@ -38,15 +45,16 @@ if (!empty($_POST)) {
|
||||||
|
|
||||||
foreach ($configdata as $key => $value) {
|
foreach ($configdata as $key => $value) {
|
||||||
try {
|
try {
|
||||||
$utils->setValue($key, $value);
|
Config::i()->setValue($key, $value);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
die("Error while updating config in database, at " . htmlspecialchars($key) . " => " . htmlspecialchars($value));
|
die("Error while updating config in database, at " . htmlspecialchars($key) . " => " . htmlspecialchars($value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$cacheIcons = true;
|
$cacheIcons = true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$errormessage .= '<br>Cannot retrieve server information';
|
$errormessage = 'Cannot retrieve server information';
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$errormessage = htmlspecialchars("Error " . $e->getCode() . ": " . $e->getMessage());
|
$errormessage = htmlspecialchars("Error " . $e->getCode() . ": " . $e->getMessage());
|
||||||
|
|
Loading…
Reference in New Issue