HOR-4273 It is not possible to download the Support information in 'enterprise manager'

- Add method get server version
This commit is contained in:
Marco Antonio Nina Mena
2018-01-19 16:03:32 -04:00
parent 24a1d2d168
commit 4b8112e9ba
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 = '';
if (stripos($_SERVER['SERVER_SOFTWARE'], 'apache') !== false) {
$serverVersion = apache_get_version();
}
if (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false) {
$serverVersion = $_SERVER['SERVER_SOFTWARE'];
}
return $serverVersion;
}
}
// end System class