From d976b5fecb94f26d1eee65b04e88e61ed342425d Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 30 May 2006 09:42:29 +0000 Subject: [PATCH] blacklist PHP 5.0.x in installation precheck; merged from MOODLE_16_STABLE --- install.php | 12 +++++++++++- install/lang/en_utf8/installer.php | 7 ++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/install.php b/install.php index 51d19e0320..8be0933285 100644 --- a/install.php +++ b/install.php @@ -677,7 +677,7 @@ function form_table($nextstage = WELCOME, $formaction = "install.php") { $compatsuccess = true; /// Check that PHP is of a sufficient version - print_compatibility_row(check_php_version("4.1.0"), get_string('phpversion', 'install'), get_string('phpversionerror', 'install'), 'phpversionhelp'); + print_compatibility_row(inst_check_php_version(), get_string('phpversion', 'install'), get_string('phpversionerror', 'install'), 'phpversionhelp'); /// Check session auto start print_compatibility_row(!ini_get_bool('session.auto_start'), get_string('sessionautostart', 'install'), get_string('sessionautostarterror', 'install'), 'sessionautostarthelp'); /// Check magic quotes @@ -967,6 +967,16 @@ function check_memory_limit() { //==========================================================================// +function inst_check_php_version() { + if (!check_php_version("4.3.0")) { + return false; + } else if (check_php_version("5.0.0")) { + return check_php_version("5.1.0"); // 5.0.x is too buggy + } + return true; // 4.3.x or 4.4.x is fine +} +//==========================================================================// + /* This function returns a list of languages and their full names. The * list of available languages is fetched from install/lang/xx/installer.php * and it's used exclusively by the installation process diff --git a/install/lang/en_utf8/installer.php b/install/lang/en_utf8/installer.php index 2d6a0f875f..b91aab6d6e 100644 --- a/install/lang/en_utf8/installer.php +++ b/install/lang/en_utf8/installer.php @@ -151,10 +151,11 @@ $string['ok'] = 'OK'; $string['pass'] = 'Pass'; $string['password'] = 'Password'; $string['phpversion'] = 'PHP version'; -$string['phpversionerror'] = 'PHP version must be at least 4.1.0'; -$string['phpversionhelp'] = '

Moodle requires a PHP version of at least 4.1.0.

+$string['phpversionerror'] = 'PHP version must be at least 4.3.0 or 5.1.0 (5.0.x has a number of known problems).'; +$string['phpversionhelp'] = '

Moodle requires a PHP version of at least 4.3.0 or 5.1.0 (5.0.x has a number of known problems).

You are currently running version $a

-

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

'; +

You must upgrade PHP or move to a host with a newer version of PHP!
+(In case of 5.0.x you could also downgrade to 4.4.x version)

'; $string['previous'] = 'Previous'; $string['remotedownloadnotallowed'] = 'Download of components to your server isn\'t allowed (allow_url_fopen is disabled).

You must download the url\">$a->url file manually, copy it to \"$a->dest\" in your server and unzip it there.'; $string['report'] = 'Report'; -- 2.39.5