Check that Webserver is not Apache/1.x in light of installer assets/.htaccess alterations

This commit is contained in:
Nightjar 2013-05-25 18:05:53 +12:00
parent 53115d93c6
commit 5ec8158977
3 changed files with 14 additions and 1 deletions

View File

@ -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);

View File

@ -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.

View File

@ -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.