From a1384f67b73eb47d2420d1668ba7bc636b2359f7 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 3 Oct 2017 01:44:06 +1300 Subject: [PATCH 1/7] Simplify serving static assets in index.php No need to perform custom file reading. See https://github.com/laravel/laravel/blob/master/server.php#L18 and http://php.net/manual/en/features.commandline.webserver.php --- index.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/index.php b/index.php index 124b7b3..e301b78 100644 --- a/index.php +++ b/index.php @@ -51,18 +51,9 @@ $_GET['url'] = $_REQUEST['url'] = $url; $fileName = dirname($_SERVER['SCRIPT_FILENAME']) . '/' . $url; -/** - * This code is a very simple wrapper for sending files - * Very quickly pass through references to files - */ +// Pass through references to existing files if ($url && file_exists($fileName)) { - $fileURL = (dirname($_SERVER['SCRIPT_NAME']) == '/' ? '' : dirname($_SERVER['SCRIPT_NAME'])) . '/' . $url; - if (isset($_SERVER['QUERY_STRING'])) { - $fileURL .= '?' . $_SERVER['QUERY_STRING']; - } - header($_SERVER['SERVER_PROTOCOL'] . ' 301 Moved Permanently'); - header("Location: $fileURL"); - die(); + return false; } require_once 'framework/main.php'; From f22d9b373554b08ee15be91c29610ed55616009c Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 3 Oct 2017 01:44:14 +1300 Subject: [PATCH 2/7] Fix main.php path --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index e301b78..d305318 100644 --- a/index.php +++ b/index.php @@ -56,4 +56,4 @@ if ($url && file_exists($fileName)) { return false; } -require_once 'framework/main.php'; +require_once 'vendor/silverstripe/framework/main.php'; From e88f7654da811df43be6fa6bd2070619d774f717 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 3 Oct 2017 01:44:14 +1300 Subject: [PATCH 3/7] Fix main.php path --- behat.yml | 4 ++-- install-frameworkmissing.html | 10 +++++----- install.php | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/behat.yml b/behat.yml index f2e65bd..feb4362 100644 --- a/behat.yml +++ b/behat.yml @@ -4,7 +4,7 @@ # ========================================================================= # # composer require silverstripe/behat-extension:^3 silverstripe/serve:dev-master se/selenium-server-standalone:2.41.0 # vendor/bin/selenium-server-standalone -Dwebdriver.firefox.bin="/Applications/Firefox31.app/Contents/MacOS/firefox-bin" -# vendor/bin/serve --bootstrap-file cms/tests/behat/serve-bootstrap.php +# vendor/bin/serve --bootstrap-file vendor/silverstripe/cms/tests/behat/serve-bootstrap.php # vendor/bin/behat @ # ========================================================================= # default: @@ -16,6 +16,6 @@ default: selenium2: browser: firefox SilverStripe\BehatExtension\Extension: - bootstrap_file: cms/tests/behat/serve-bootstrap.php + bootstrap_file: vendor/silverstripe/cms/tests/behat/serve-bootstrap.php screenshot_path: %paths.base%/artifacts/screenshots retry_seconds: 4 # default is 2 diff --git a/install-frameworkmissing.html b/install-frameworkmissing.html index 6e8d794..312460f 100644 --- a/install-frameworkmissing.html +++ b/install-frameworkmissing.html @@ -1,7 +1,7 @@ The SilverStripe Framework is missing - +
@@ -9,14 +9,14 @@ - +
- +

The SilverStripe Framework is missing - To run the installer, at least the framework module is required.

- +

If you downloaded a pre-packaged zip or tar.gz, something might have gone wrong with the packaging process. Please try re-downloading, or try an older version.

@@ -25,7 +25,7 @@
- +