BUGFIX Fixed InstallerRequirements::isApache() which didn't work if $_SERVER['SERVER_SIGNATURE'] is available for Apache

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.4@101733 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
sharvey 2010-03-26 01:54:18 +00:00 committed by Sam Minnee
parent f8b806f7df
commit 8efa9b3e41

View File

@ -277,15 +277,16 @@ class InstallRequirements {
}
function isApache() {
$webserver = strip_tags(trim(@$_SERVER['SERVER_SIGNATURE']));
if(!$webserver) {
if(isset($_SERVER['SERVER_SOFTWARE'])) {
if(strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) {
return true;
}
}
$signature = isset($_SERVER['SERVER_SIGNATURE'])
? $_SERVER['SERVER_SIGNATURE']
: @$_SERVER['SERVER_SOFTWARE'];
$signature = strip_tags(trim($signature));
if($signature && strpos($signature, 'Apache') !== false) {
return true;
} else {
return false;
}
return false;
}
function findWebserver() {