mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-03-08 15:27:43 +01:00
In aggiornamenti visualizzo il tipo di interfaccia di PHP
This commit is contained in:
parent
6f7d9f1dc3
commit
6da04b302e
@ -29,6 +29,15 @@ $modules = [
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$sapi_name = php_sapi_name();
|
||||||
|
if (strpos($sapi_name, 'apache') !== false) {
|
||||||
|
$apache_version = 'apache';
|
||||||
|
}elseif (strpos($sapi_name, 'fpm') !== false) {
|
||||||
|
$apache_version = 'fpm';
|
||||||
|
}else {
|
||||||
|
//echo "Non è possibile determinare il tipo di interfaccia di PHP.";
|
||||||
|
}
|
||||||
|
|
||||||
if (function_exists('apache_get_modules')) {
|
if (function_exists('apache_get_modules')) {
|
||||||
$available_modules = apache_get_modules();
|
$available_modules = apache_get_modules();
|
||||||
}
|
}
|
||||||
@ -36,9 +45,18 @@ if (function_exists('apache_get_modules')) {
|
|||||||
$apache = [];
|
$apache = [];
|
||||||
foreach ($modules as $name => $values) {
|
foreach ($modules as $name => $values) {
|
||||||
$description = $values['description'];
|
$description = $values['description'];
|
||||||
|
|
||||||
$status = isset($available_modules) ? in_array($name, $available_modules) : $_SERVER[$values['server']] == 'On';
|
$status = isset($available_modules) ? in_array($name, $available_modules) : $_SERVER[$values['server']] == 'On';
|
||||||
|
|
||||||
|
if ($name == 'mod_mime' && $apache_version == 'fpm' ){
|
||||||
|
$headers = get_headers( (!empty($config['redirectHTTPS']) && !isHTTPS(true))? 'https://' : 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 1);
|
||||||
|
if (isset($headers['Content-Type'])) {
|
||||||
|
$status = 1;
|
||||||
|
}else{
|
||||||
|
$status = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$apache[] = [
|
$apache[] = [
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'description' => $description,
|
'description' => $description,
|
||||||
@ -375,7 +393,9 @@ foreach ($config_to_check as $name => $values) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$requirements = [
|
$requirements = [
|
||||||
tr('Apache') => $apache,
|
tr('Apache (_VERSION_)', [
|
||||||
|
'_VERSION_' => $apache_version,
|
||||||
|
]) => $apache,
|
||||||
tr('PHP (_VERSION_ _SUPPORTED_)', [
|
tr('PHP (_VERSION_ _SUPPORTED_)', [
|
||||||
'_VERSION_' => phpversion(),
|
'_VERSION_' => phpversion(),
|
||||||
'_SUPPORTED_' => ((version_compare(phpversion(), $settings['php_version']['minimum'], '>=') && version_compare(phpversion(), $settings['php_version']['maximum'], '<=')) ? '' : '<small><small class="label label-danger" ><i class="fa fa-warning"></i> '.tr('versioni supportate:').' '.$settings['php_version']['description'].'</small></small>'),
|
'_SUPPORTED_' => ((version_compare(phpversion(), $settings['php_version']['minimum'], '>=') && version_compare(phpversion(), $settings['php_version']['maximum'], '<=')) ? '' : '<small><small class="label label-danger" ><i class="fa fa-warning"></i> '.tr('versioni supportate:').' '.$settings['php_version']['description'].'</small></small>'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user