Add curl to installer required modules

This commit is contained in:
phl0
2024-07-30 01:51:01 +02:00
parent 26072429ae
commit 0e1ba25ed4
2 changed files with 15 additions and 3 deletions

View File

@@ -133,3 +133,15 @@ function detect_nginx_php_setting($http_scheme) {
curl_close($ch); curl_close($ch);
return $code; return $code;
} }
function installer_required_modules() {
$installer_required_modules = array("mbstring", "curl");
$not_found_modules = array();
foreach ($installer_required_modules as $module) {
if (!extension_loaded($module)) {
//unset($installer_required_modules[$module]);
array_push($not_found_modules, 'php-'.$module);
}
}
return $not_found_modules;
}

View File

@@ -16,7 +16,7 @@ if (!file_exists('.lock')) {
// php-mbstring has to be installed for the installer to work properly!! // php-mbstring has to be installed for the installer to work properly!!
// The other prechecks can be run within the installer. // The other prechecks can be run within the installer.
if ($required_php_modules['php-mbstring']['condition']) { ?> if ($required_php_modules['php-mbstring']['condition'] && $required_php_modules['php-curl']['condition']) { ?>
<body> <body>
@@ -1897,9 +1897,9 @@ if (!file_exists('.lock')) {
<div class="card-body text-center p-4"> <div class="card-body text-center p-4">
<h3 style="margin-top: 50px;"><?= __("PHP Module missing"); ?></h3> <h3 style="margin-top: 50px;"><?= __("PHP Module missing"); ?></h3>
<img src="assets/images/danger_triangle.png" alt="danger_triangle" style="max-width: 400px; height: auto; margin-bottom: 50px;"> <img src="assets/images/danger_triangle.png" alt="danger_triangle" style="max-width: 400px; height: auto; margin-bottom: 50px;">
<p><?= sprintf(__("The PHP module %s is missing."), "<code>php-mbstring</code>"); ?></p> <p><?= __("The following PHP modules are missing:")." <code>".implode(',', installer_required_modules())."</code>"; ?></p>
<p><?= __("Without this module the Wavelog Installer does not work!"); ?></p> <p><?= __("Without this module the Wavelog Installer does not work!"); ?></p>
<p><?= sprintf(__("Install %s and restart the webserver."), "<code>php-mbstring</code>"); ?></p> <p><?= __("Please install the required modules and restart the webserver."); ?></p>
</div> </div>
</div> </div>
</div> </div>