Skip to content

Commit

Permalink
MDL-14645 PHP 5.2.0 now required for new installation - installer lan…
Browse files Browse the repository at this point in the history
…g packs will be updated automatically later by cron job on cvs.moodle.org
  • Loading branch information
skodak committed May 1, 2008
1 parent dd93d8e commit b4ac624
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion admin/cliupgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
console_write(STDOUT, "\n", '', false);
}
/// Check that PHP is of a sufficient version
check_compatibility(inst_check_php_version(), get_string('phpversion', 'install'), get_string('phpversionerror', 'install'),false,$silent);
check_compatibility(inst_check_php_version(), get_string('phpversion', 'install'), get_string('php52versionerror', 'install'),false,$silent);
/// Check session auto start
check_compatibility(!ini_get_bool('session.auto_start'), get_string('sessionautostart', 'install'), get_string('sessionautostarterror', 'install'),false,$silent);
/// Check magic quotes
Expand Down
9 changes: 2 additions & 7 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ function form_table($nextstage = WELCOME, $formaction = "install.php") {
$compatsuccess = true;

/// Check that PHP is of a sufficient version
print_compatibility_row(inst_check_php_version(), get_string('phpversion', 'install'), get_string('phpversionerror', 'install'), 'phpversionhelp');
print_compatibility_row(inst_check_php_version(), get_string('phpversion', 'install'), get_string('php52versionerror', 'install'), 'php52versionhelp');
/// 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
Expand Down Expand Up @@ -1061,12 +1061,7 @@ 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
return check_php_version("5.2.0");
}
//==========================================================================//

Expand Down
2 changes: 2 additions & 0 deletions install/stringnames.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ password
pearargerror
pgsqlextensionisnotpresentinphp
php50restricted
php52versionerror
php52versionhelp
phpversion
phpversionerror
phpversionhelp
Expand Down
5 changes: 4 additions & 1 deletion lang/en_utf8/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,11 @@
$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'] = '<p>Moodle requires a PHP version of at least 5.2.0.</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!';
$string['phpversion'] = 'PHP version';
$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!<br/>
Expand Down
7 changes: 1 addition & 6 deletions lib/installlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -568,12 +568,7 @@ function check_memory_limit() {
* @return boolean
*/
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
return check_php_version("5.2.0");
}
/**
* Print environment status to standard out
Expand Down

0 comments on commit b4ac624

Please sign in to comment.