Skip to content
Browse files

BUGFIX Sometimes SERVER_SIGNATURE isn't populated in PHP, so fall bac…

…k 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
  • Loading branch information...
1 parent 3077816 commit 62d6260fab7dde39691a2c3737f6aa7323fa330d sminnee committed Oct 13, 2010
Showing with 5 additions and 3 deletions.
  1. +5 −3 install.php
View
8 install.php
@@ -230,9 +230,11 @@ function check() {
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";
}

0 comments on commit 62d6260

Please sign in to comment.
Something went wrong with that request. Please try again.