From a49709851e8cb7f1b21c4aa13c86590248699aef Mon Sep 17 00:00:00 2001 From: skodak Date: Fri, 1 Aug 2008 09:44:37 +0000 Subject: [PATCH] MDL-15410 Require PHP 5.2.4 instead of 5.2.0 in HEAD because PHP 5.2.0 has many known problems :-( --- admin/cliupgrade.php | 4 ++-- admin/environment.xml | 2 +- admin/index.php | 4 ++-- lang/en_utf8/install.php | 4 ++-- lib/installlib.php | 2 +- lib/moodlelib.php | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/admin/cliupgrade.php b/admin/cliupgrade.php index 2def6b953f..b4cb4642d3 100644 --- a/admin/cliupgrade.php +++ b/admin/cliupgrade.php @@ -659,9 +659,9 @@ if ( file_exists(dirname(dirname(__FILE__)) . '/config.php')) { /// Check that PHP is of a sufficient version /// Moved here because older versions do not allow while(@ob_end_clean()); - if (version_compare(phpversion(), "5.2.0") < 0) { + if (version_compare(phpversion(), "5.2.4") < 0) { $phpversion = phpversion(); - console_write(STDERR,"Sorry, Moodle requires PHP 5.2.0 or later (currently using version $phpversion)",'',false); + console_write(STDERR,"Sorry, Moodle requires PHP 5.2.4 or later (currently using version $phpversion)",'',false); } /// Turn off time limits and try to flush everything all the time, sometimes upgrades can be slow. diff --git a/admin/environment.xml b/admin/environment.xml index 721f103ab2..e67c9e0b67 100644 --- a/admin/environment.xml +++ b/admin/environment.xml @@ -216,7 +216,7 @@ - + diff --git a/admin/index.php b/admin/index.php index 63d37d3c4e..2630f07f0b 100644 --- a/admin/index.php +++ b/admin/index.php @@ -8,9 +8,9 @@ /// Check that PHP is of a sufficient version /// Moved here because older versions do not allow while(@ob_end_clean()); - if (version_compare(phpversion(), "5.2.0") < 0) { + if (version_compare(phpversion(), "5.2.4") < 0) { $phpversion = phpversion(); - echo "Sorry, Moodle requires PHP 5.2.0 or later (currently using version $phpversion)"; + echo "Sorry, Moodle requires PHP 5.2.4 or later (currently using version $phpversion)"; die; } diff --git a/lang/en_utf8/install.php b/lang/en_utf8/install.php index 96b7f0bdaf..caf26ca903 100644 --- a/lang/en_utf8/install.php +++ b/lang/en_utf8/install.php @@ -300,8 +300,8 @@ $string['odbc_mssql'] = 'SQL*Server over ODBC (odbc_mssql)'; $string['odbcextensionisnotpresentinphp'] = 'PHP has not been properly configured with the ODBC extension so that it can communicate with SQL*Server. Please check your php.ini file or recompile PHP.'; $string['pass'] = 'Pass'; $string['pgsqlextensionisnotpresentinphp'] = 'PHP has not been properly configured with the PGSQL extension so that it can communicate with PostgreSQL. Please check your php.ini file or recompile PHP.'; -$string['php52versionerror'] = 'PHP version must be at least 5.2.0.'; -$string['php52versionhelp'] = '

Moodle requires a PHP version of at least 5.2.0.

+$string['php52versionerror'] = 'PHP version must be at least 5.2.4.'; +$string['php52versionhelp'] = '

Moodle requires a PHP version of at least 5.2.4.

You are currently running version $a

You must upgrade PHP or move to a host with a newer version of PHP!

'; $string['phpversion'] = 'PHP version'; diff --git a/lib/installlib.php b/lib/installlib.php index d342861da4..04ef1cdbe0 100644 --- a/lib/installlib.php +++ b/lib/installlib.php @@ -77,5 +77,5 @@ function check_memory_limit() { * @return boolean */ function inst_check_php_version() { - return check_php_version("5.2.0"); + return check_php_version("5.2.4"); } diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 1f05e8f464..3c8fe40f0c 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -6071,7 +6071,7 @@ function plugin_supports($type,$name,$feature) { * @param string $version The version of php being tested. * @return bool */ -function check_php_version($version='5.2.0') { +function check_php_version($version='5.2.4') { return (version_compare(phpversion(), $version) >= 0); } -- 2.39.5