Merged in bugfix/HOR-4273 (pull request #6314)

HOR-4273

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Marco Antonio Nina Mena
2018-01-23 01:54:14 +00:00
committed by Julio Cesar Laura Avendaño
2 changed files with 23 additions and 6 deletions

View File

@@ -1439,12 +1439,9 @@ class adminProxy extends HttpProxyController
//PHP Version
$params['php'] = $systemInfo->php->version;
//Apache - IIS Version
try {
$params['apache'] = apache_get_version();
} catch (Exception $e) {
$params['apache'] = '';
}
//Apache - nginx - IIS Version
$params['serverSoftwareVersion'] = System::getServerVersion();
//Installed Plugins (license info?)
$arrayAddon = array ();

View File

@@ -1291,5 +1291,25 @@ class System
throw $e;
}
}
/**
* Return version server software Apache/Nginx
*
* @return string version server software Apache/Nginx
*/
public static function getServerVersion()
{
$serverVersion = 'Undetermined';
if (stripos($_SERVER['SERVER_SOFTWARE'], 'apache') !== false) {
$serverVersion = function_exists('apache_get_version') ? apache_get_version() : $_SERVER['SERVER_SOFTWARE'];
}
if (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false) {
$serverVersion = $_SERVER['SERVER_SOFTWARE'];
}
return $serverVersion;
}
}
// end System class