mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Update docs and version checking for PHP 5.3+
This commit is contained in:
parent
58e912d4d7
commit
68aaae8cc0
@ -42,8 +42,6 @@ Director::addRules(20, array(
|
||||
Object::useCustomClass('SSDatetime', 'SS_Datetime', true);
|
||||
Object::useCustomClass('Datetime', 'SS_Datetime', true);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The root directory of TinyMCE
|
||||
*/
|
||||
|
@ -1,26 +1,25 @@
|
||||
<?php
|
||||
|
||||
|
||||
/************************************************************************************
|
||||
************************************************************************************
|
||||
** **
|
||||
** If you can read this text in your browser then you don't have PHP installed. **
|
||||
** Please install PHP 5.2 or higher, preferably PHP 5.3. **
|
||||
** Please install PHP 5.3 or higher. **
|
||||
** **
|
||||
************************************************************************************
|
||||
************************************************************************************/
|
||||
|
||||
/**
|
||||
* PHP version check. Make sure we've got at least PHP 5.2 in the most friendly way possible
|
||||
* PHP version check. Make sure we've got at least PHP 5.3 in the most friendly way possible
|
||||
*/
|
||||
|
||||
$majorVersion = strtok(phpversion(),'.');
|
||||
$minorVersion = strtok('.');
|
||||
|
||||
if($majorVersion < 5 || ($majorVersion == 5 && $minorVersion < 2)) {
|
||||
if($majorVersion < 5 || ($majorVersion == 5 && $minorVersion < 3)) {
|
||||
header("HTTP/1.1 500 Server Error");
|
||||
echo str_replace('$PHPVersion', phpversion(), file_get_contents("sapphire/dev/install/php5-required.html"));
|
||||
die();
|
||||
}
|
||||
|
||||
include('sapphire/dev/install/install.php5');
|
||||
include('sapphire/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.2 or higher, preferably PHP 5.3. **
|
||||
** Please install PHP 5.3 or higher. **
|
||||
** **
|
||||
************************************************************************************
|
||||
************************************************************************************/
|
||||
|
@ -11,7 +11,6 @@
|
||||
<div id="Container">
|
||||
<div id="Header">
|
||||
<h1>SilverStripe CMS Installation</h1>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="Navigation"> </div>
|
||||
@ -20,10 +19,10 @@
|
||||
<div id="Layout">
|
||||
<div class="typography">
|
||||
<h1>PHP 5 required</h1>
|
||||
<h2>To run SilverStripe, please install PHP 5.2 or greater.</h2>
|
||||
<h2>To run SilverStripe, please install PHP 5.3 or greater.</h2>
|
||||
|
||||
<p>We have detected that you are running PHP version <b>$PHPVersion</b>. In order to run SilverStripe,
|
||||
you must have PHP version 5.2 or greater, and for best results we recommend PHP 5.3 or greater.</p>
|
||||
you must have PHP version 5.3 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>
|
||||
@ -37,4 +36,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
7
main.php
7
main.php
@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
/************************************************************************************
|
||||
************************************************************************************
|
||||
** **
|
||||
** If you can read this text in your browser then you don't have PHP installed. **
|
||||
** Please install PHP 5.0 or higher, preferably PHP 5.2 or 5.3. **
|
||||
** Please install PHP 5.3 or higher. **
|
||||
** **
|
||||
************************************************************************************
|
||||
************************************************************************************/
|
||||
@ -12,8 +13,10 @@
|
||||
* @package sapphire
|
||||
* @subpackage core
|
||||
*/
|
||||
$majorVersion = strtok(phpversion(),'.');
|
||||
$minorVersion = strtok('.');
|
||||
|
||||
if(version_compare(phpversion(), 5, '<')) {
|
||||
if($majorVersion < 5 || ($majorVersion == 5 && $minorVersion < 3)) {
|
||||
header("HTTP/1.1 500 Server Error");
|
||||
echo str_replace('$PHPVersion', phpversion(), file_get_contents("dev/install/php5-required.html"));
|
||||
die();
|
||||
|
Loading…
Reference in New Issue
Block a user