diff --git a/install.php b/install.php index 85a3af98..4da73708 100644 --- a/install.php +++ b/install.php @@ -305,17 +305,15 @@ function isApache() { /** * Find the webserver software running on the PHP host. - * @return string Server software ("Unknown" if not able to find) + * @return string|boolean Server software or boolean FALSE */ function findWebserver() { // Try finding from SERVER_SIGNATURE or SERVER_SOFTWARE $webserver = @$_SERVER['SERVER_SIGNATURE']; if(!$webserver) $webserver = @$_SERVER['SERVER_SOFTWARE']; - // If we still can't find it, this is a completely unknown server - if(!$webserver) $webserver = 'Unknown'; - - return strip_tags(trim($webserver)); + if($webserver) return strip_tags(trim($webserver)); + else return false; } /** @@ -793,12 +791,10 @@ function requireServerVariables($varNames, $errorMessage) { $this->error($testDetails); } } - + function isRunningWebServer($testDetails) { $this->testing($testDetails); - if(function_exists('apache_get_modules') || stristr(@$_SERVER['SERVER_SIGNATURE'], 'Apache')) { - return true; - } elseif(strpos($_SERVER['SERVER_SOFTWARE'], 'IIS/7') !== false) { + if($testDetails[3]) { return true; } else { $this->warning($testDetails); @@ -806,7 +802,6 @@ function isRunningWebServer($testDetails) { } } - // Must be PHP4 compatible var $baseDir; function getBaseDir() {