Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ENHANCEMENT: Change PHP version requirements. Part of #7131.

  • Loading branch information...
commit 8b0dafb30d51573a0d195acf5676314b4c815d3a 1 parent 0fd7ce6
@robert-h-curry robert-h-curry authored
View
9 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();
View
4 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",
View
10 dev/install/php5-required.html
@@ -1,18 +1,18 @@
<html>
<head>
- <title>PHP 5.3 is required</title>
+ <title>PHP 5.3.2 is required</title>
<link rel="stylesheet" type="text/css" href="sapphire/dev/install/css/install.css">
</head>
<body>
<div id="BgContainer">
<div id="Container">
<div id="Header">
- <h1>PHP 5.3 required</h1>
+ <h1>PHP 5.3.2 required</h1>
<div class="left">
- <h3>To run SilverStripe, please install PHP 5.3 or greater.</h3>
+ <h3>To run SilverStripe, please install PHP 5.3.2 or greater.</h3>
- <p>We have detected that you are running PHP version <b>$PHPVersion</b>. In order to run SilverStripe,
- you must have PHP version 5.3 or greater, and for best results we recommend PHP 5.3.8 or greater.<p/>
+ <p>We have detected that you are running PHP version <b>$PHPVersion</b>. In order to run SilverStripe,
+ you must have PHP version 5.3.2 or greater, and for best results we recommend PHP 5.3.10 or greater.<p/>
<p>If you are running on a shared host, you may need to ask your hosting provider how to do this.</p>
</div>
View
6 main.php
@@ -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. **
** **
************************************************************************************
************************************************************************************/
@@ -13,10 +13,8 @@
* @package sapphire
* @subpackage core
*/
-$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("dev/install/php5-required.html"));
die();
Please sign in to comment.
Something went wrong with that request. Please try again.