$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
//==========================================================================//
+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
$string['pass'] = 'Pass';
$string['password'] = 'Password';
$string['phpversion'] = 'PHP version';
-$string['phpversionerror'] = 'PHP version must be at least 4.1.0';
-$string['phpversionhelp'] = '<p>Moodle requires a PHP version of at least 4.1.0.</p>
+$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'] = '<p>Moodle requires a PHP version of at least 4.3.0 or 5.1.0 (5.0.x has a number of known problems).</p>
<p>You are currently running version $a</p>
-<p>You must upgrade PHP or move to a host with a newer version of PHP!</p>';
+<p>You must upgrade PHP or move to a host with a newer version of PHP!<br/>
+(In case of 5.0.x you could also downgrade to 4.4.x version)</p>';
$string['previous'] = 'Previous';
$string['remotedownloadnotallowed'] = 'Download of components to your server isn\'t allowed (allow_url_fopen is disabled).<br /><br />You must download the <a href=\"$a->url\">$a->url</a> file manually, copy it to \"$a->dest\" in your server and unzip it there.';
$string['report'] = 'Report';