From 8b0dafb30d51573a0d195acf5676314b4c815d3a Mon Sep 17 00:00:00 2001 From: Robert Curry Date: Fri, 13 Apr 2012 13:12:48 +1200 Subject: [PATCH] ENHANCEMENT: Change PHP version requirements. Part of #7131. --- dev/install/install.php | 9 +++------ dev/install/install.php5 | 4 ++-- dev/install/php5-required.html | 10 +++++----- main.php | 6 ++---- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/dev/install/install.php b/dev/install/install.php index 20c86a13d..9d994d587 100644 --- a/dev/install/install.php +++ b/dev/install/install.php @@ -4,19 +4,16 @@ ************************************************************************************ ** ** ** If you can read this text in your browser then you don't have PHP installed. ** - ** Please install PHP 5.3 or higher. ** + ** Please install PHP 5.3.2 or higher, preferably PHP 5.3.10. ** ** ** ************************************************************************************ ************************************************************************************/ /** - * PHP version check. Make sure we've got at least PHP 5.3 in the most friendly way possible + * PHP version check. Make sure we've got at least PHP 5.3.2 in the most friendly way possible */ -$majorVersion = strtok(phpversion(),'.'); -$minorVersion = strtok('.'); - -if($majorVersion < 5 || ($majorVersion == 5 && $minorVersion < 3)) { +if (version_compare(phpversion(), '5.3.2', '<')) { header("HTTP/1.1 500 Server Error"); echo str_replace('$PHPVersion', phpversion(), file_get_contents("sapphire/dev/install/php5-required.html")); die(); diff --git a/dev/install/install.php5 b/dev/install/install.php5 index 7936e7c2c..57c5e470b 100644 --- a/dev/install/install.php5 +++ b/dev/install/install.php5 @@ -4,7 +4,7 @@ ************************************************************************************ ** ** ** If you can read this text in your browser then you don't have PHP installed. ** - ** Please install PHP 5.3 or higher. ** + ** Please install PHP 5.3.2 or higher, preferably PHP 5.3.10. ** ** ** ************************************************************************************ ************************************************************************************/ @@ -325,7 +325,7 @@ class InstallRequirements { $isIIS = $this->isIIS(7); $webserver = $this->findWebserver(); - $this->requirePHPVersion('5.3.0', '5.2.0', array("PHP Configuration", "PHP5 installed", null, "PHP version " . phpversion())); + $this->requirePHPVersion('5.3.10', '5.3.2', array("PHP Configuration", "PHP5 installed", null, "PHP version " . phpversion())); // Check that we can identify the root folder successfully $this->requireFile('sapphire/dev/install/config-form.html', array("File permissions", diff --git a/dev/install/php5-required.html b/dev/install/php5-required.html index 0d1116737..929759605 100644 --- a/dev/install/php5-required.html +++ b/dev/install/php5-required.html @@ -1,18 +1,18 @@ - PHP 5.3 is required + PHP 5.3.2 is required