From 5ec8158977e801b87667ac19474d1fa43fbea58f Mon Sep 17 00:00:00 2001 From: Nightjar Date: Sat, 25 May 2013 18:05:53 +1200 Subject: [PATCH] Check that Webserver is not Apache/1.x in light of installer assets/.htaccess alterations --- dev/install/install.php5 | 12 ++++++++++++ docs/en/changelogs/3.1.0.md | 1 + docs/en/installation/server-requirements.md | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dev/install/install.php5 b/dev/install/install.php5 index d3adfa2bf..d08870379 100644 --- a/dev/install/install.php5 +++ b/dev/install/install.php5 @@ -413,6 +413,7 @@ class InstallRequirements { $this->requireModule(FRAMEWORK_NAME, array("File permissions", FRAMEWORK_NAME . "/ directory exists?")); if($isApache) { + $this->checkApacheVersion(array("Webserver Configuration", "Webserver is not Apache 1.x", "SilverStripe requires Apache version 2 or greater", $webserver)); $this->requireWriteable('.htaccess', array("File permissions", "Is the .htaccess file writeable?", null)); } elseif($isIIS) { $this->requireWriteable('web.config', array("File permissions", "Is the web.config file writeable?", null)); @@ -668,6 +669,17 @@ class InstallRequirements { else return true; } + function checkApacheVersion($testDetails) { + $this->testing($testDetails); + + $is1pointx = preg_match('#Apache[/ ]1\.#', $testDetails[3]); + if($is1pointx) { + $this->error($testDetails); + } + + return true; + } + function requirePHPVersion($recommendedVersion, $requiredVersion, $testDetails) { $this->testing($testDetails); diff --git a/docs/en/changelogs/3.1.0.md b/docs/en/changelogs/3.1.0.md index f038bcd8c..299a24866 100644 --- a/docs/en/changelogs/3.1.0.md +++ b/docs/en/changelogs/3.1.0.md @@ -458,3 +458,4 @@ you can enable those warnings and future-proof your code already. * `Object` now has `beforeExtending` and `afterExtending` to inject behaviour around method extension. `DataObject` also has `beforeUpdateCMSFields` to insert fields between automatic scaffolding and extension by `updateCMSFields`. See the [DataExtension Reference](/reference/dataextension) for more information. +* Support for Apache 1.x is removed. diff --git a/docs/en/installation/server-requirements.md b/docs/en/installation/server-requirements.md index 7eb32ca83..02caee86a 100644 --- a/docs/en/installation/server-requirements.md +++ b/docs/en/installation/server-requirements.md @@ -25,7 +25,7 @@ Our web-based [PHP installer](/installation) can check if you meet the requireme * SQL Server 2008+ (requires ["mssql" module](http://silverstripe.org/microsoft-sql-server-database/)) * Support for [Oracle](http://www.silverstripe.org/oracle-database-module/) and [SQLite](http://silverstripe.org/sqlite-database/) is not commercially supported, but is under development by our open source community. * One of the following web server products: - * Apache 1.3+ with mod_rewrite and "AllowOverride All" set + * Apache 2.0+ with mod_rewrite and "AllowOverride All" set * IIS 7+ * Support for Lighttpd, IIS 6, and other web servers may work if you are familiar with configuring those products. * We recommend enabling content compression (for example with mod_deflate) to speed up the delivery of HTML, CSS, and JavaScript.