Skip to content
This repository
Browse code

MINOR Installer cleanups, removing references to old "command line

installation" which is no longer supported.
MINOR Removed stray semi-colon when showing version in installer
template.
  • Loading branch information...
commit e71b8d6215e88af7ae3a7b0cf7d88eb8fa727b38 1 parent befbd3e
Sean Harvey authored April 15, 2012
2  dev/install/config-form.html
@@ -17,7 +17,7 @@
17 17
 				<div id="Header">
18 18
 					<h1>SilverStripe</h1>
19 19
 					<div class="left">
20  
-						<h2>CMS / Framework Installation <?php if($silverstripe_version) echo "<small>Version $silverstripe_version;</small>"; ?></h2>
  20
+						<h2>CMS / Framework Installation <?php if($silverstripe_version) echo "<small>Version $silverstripe_version</small>"; ?></h2>
21 21
 						<p>Thanks for choosing to use SilverStripe! Please follow the instructions below and you should be up in running in no time.<br>
22 22
 								If you get stuck, head over to the <a href="http://silverstripe.org/installing-silverstripe" target="_blank">installation forum</a>, or check out our list of <a href="http://doc.silverstripe.org/doku.php?id=suggested-web-hosts" target="_blank">suggested web hosts</a> known to work with SilverStripe.
23 23
 						</p>
31  dev/install/install.php5
@@ -353,20 +353,18 @@ class InstallRequirements {
353 353
 		}
354 354
 
355 355
 		// Check for web server, unless we're calling the installer from the command-line
356  
-		if(!isset($_SERVER['argv']) || !$_SERVER['argv']) {
357  
-			$this->isRunningWebServer(array("Webserver Configuration", "Server software", "Unknown", $webserver));
  356
+		$this->isRunningWebServer(array("Webserver Configuration", "Server software", "Unknown", $webserver));
358 357
 
359  
-			if($isApache) {
360  
-				$this->requireApacheRewriteModule('mod_rewrite', array("Webserver Configuration", "URL rewriting support", "You need mod_rewrite to use friendly URLs with SilverStripe, but it is not enabled."));
361  
-			} elseif($isIIS) {
362  
-				$this->requireIISRewriteModule('IIS_UrlRewriteModule', array("Webserver Configuration", "URL rewriting support", "You need to enable the IIS URL Rewrite Module to use friendly URLs with SilverStripe, but it is not installed or enabled. Download it for IIS 7 from http://www.iis.net/expand/URLRewrite"));
363  
-			} else {
364  
-				$this->warning(array("Webserver Configuration", "URL rewriting support", "I can't tell whether any rewriting module is running.  You may need to configure a rewriting rule yourself."));
365  
-			}
366  
-
367  
-			$this->requireServerVariables(array('SCRIPT_NAME','HTTP_HOST','SCRIPT_FILENAME'), array("Webserver config", "Recognised webserver", "You seem to be using an unsupported webserver.  The server variables SCRIPT_NAME, HTTP_HOST, SCRIPT_FILENAME need to be set."));
  358
+		if($isApache) {
  359
+			$this->requireApacheRewriteModule('mod_rewrite', array("Webserver Configuration", "URL rewriting support", "You need mod_rewrite to use friendly URLs with SilverStripe, but it is not enabled."));
  360
+		} elseif($isIIS) {
  361
+			$this->requireIISRewriteModule('IIS_UrlRewriteModule', array("Webserver Configuration", "URL rewriting support", "You need to enable the IIS URL Rewrite Module to use friendly URLs with SilverStripe, but it is not installed or enabled. Download it for IIS 7 from http://www.iis.net/expand/URLRewrite"));
  362
+		} else {
  363
+			$this->warning(array("Webserver Configuration", "URL rewriting support", "I can't tell whether any rewriting module is running.  You may need to configure a rewriting rule yourself."));
368 364
 		}
369 365
 
  366
+		$this->requireServerVariables(array('SCRIPT_NAME','HTTP_HOST','SCRIPT_FILENAME'), array("Webserver config", "Recognised webserver", "You seem to be using an unsupported webserver.  The server variables SCRIPT_NAME, HTTP_HOST, SCRIPT_FILENAME need to be set."));
  367
+
370 368
 		// Check for GD support
371 369
 		if(!$this->requireFunction("imagecreatetruecolor", array("PHP Configuration", "GD2 support", "PHP must have GD version 2."))) {
372 370
 			$this->requireFunction("imagecreate", array("PHP Configuration", "GD2 support", "GD support for PHP not included."));
@@ -935,8 +933,7 @@ class Installer extends InstallRequirements {
935 933
 	}
936 934
 
937 935
 	function install($config) {
938  
-		if(isset($_SERVER['HTTP_HOST'])) {
939  
-			?>
  936
+?>
940 937
 <html>
941 938
 	<head>
942 939
 		<title>Installing SilverStripe...</title>
@@ -963,9 +960,6 @@ class Installer extends InstallRequirements {
963 960
 				<p>If you receive a fatal error, refresh this page to continue the installation</p>
964 961
 				<ul>
965 962
 <?php
966  
-		} else {
967  
-			echo "SILVERSTRIPE COMMAND-LINE INSTALLATION\n\n";
968  
-		}
969 963
 
970 964
 		$webserver = $this->findWebserver();
971 965
 		$isIIS = $this->isIIS();
@@ -1279,11 +1273,6 @@ TEXT;
1279 1273
 	}
1280 1274
 
1281 1275
 	function checkRewrite() {
1282  
-		if(!isset($_SERVER['HTTP_HOST']) || !$_SERVER['HTTP_HOST']) {
1283  
-			$this->statusMessage("Installer seems to be called from command-line, we're going to assume that rewriting is working.");
1284  
-			return true;
1285  
-		}
1286  
-
1287 1276
 		$destinationURL = str_replace('install.php', '', $_SERVER['SCRIPT_NAME']) .
1288 1277
 			($this->checkModuleExists('cms') ? 'home/successfullyinstalled?flush=1' : '?flush=1');
1289 1278
 

0 notes on commit e71b8d6

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