BUGFIX Sometimes SERVER_SIGNATURE isn't populated in PHP, so fall back to using SERVER_SOFTWARE to detect the webserver during SS install (from r93113)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/trunk@112084 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
sminnee 2010-10-13 02:20:13 +00:00
parent 3077816c25
commit 62d6260fab

View File

@ -230,9 +230,11 @@ class InstallRequirements {
if(!isset($_SERVER['argv']) || !$_SERVER['argv']) {
$webserver = strip_tags(trim($_SERVER['SERVER_SIGNATURE']));
if(!$webserver) {
if(isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'IIS') !== false) {
$pieces = explode('-', $_SERVER['SERVER_SOFTWARE']);
if(isset($pieces[1])) $webserver = $pieces[1];
if(isset($_SERVER['SERVER_SOFTWARE'])) {
if(strpos($_SERVER['SERVER_SOFTWARE'], 'IIS') !== false ||
strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false) {
$webserver = $_SERVER['SERVER_SOFTWARE'];
}
} else {
$webserver = "I can't tell what webserver you are running";
}