Skip to content

Commit

Permalink
MDL-39006 environment: raise all uses of 5.3.2 to 5.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Apr 7, 2013
1 parent 422f68f commit 0fd23b7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions admin/cli/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@
define('CACHE_DISABLE_ALL', true);

// Check that PHP is of a sufficient version
if (version_compare(phpversion(), "5.3.2") < 0) {
if (version_compare(phpversion(), "5.3.3") < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN NOT move it after installib
fwrite(STDERR, "Moodle 2.1 or later requires at least PHP 5.3.2 (currently using version $phpversion).\n");
fwrite(STDERR, "Moodle 2.5 or later requires at least PHP 5.3.3 (currently using version $phpversion).\n");
fwrite(STDERR, "Please upgrade your server software or install older Moodle version.\n");
exit(1);
}
Expand Down
4 changes: 2 additions & 2 deletions admin/cli/install_database.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
";

// Check that PHP is of a sufficient version
if (version_compare(phpversion(), "5.3.2") < 0) {
if (version_compare(phpversion(), "5.3.3") < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN NOT move it after installib
fwrite(STDERR, "Moodle 2.1 or later requires at least PHP 5.3.2 (currently using version $phpversion).\n");
fwrite(STDERR, "Moodle 2.5 or later requires at least PHP 5.3.3 (currently using version $phpversion).\n");
fwrite(STDERR, "Please upgrade your server software or install older Moodle version.\n");
exit(1);
}
Expand Down
4 changes: 2 additions & 2 deletions admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
}

// Check that PHP is of a sufficient version as soon as possible
if (version_compare(phpversion(), '5.3.2') < 0) {
if (version_compare(phpversion(), '5.3.3') < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN NOT move it to later place
echo "Moodle 2.1 or later requires at least PHP 5.3.2 (currently using version $phpversion).<br />";
echo "Moodle 2.5 or later requires at least PHP 5.3.3 (currently using version $phpversion).<br />";
echo "Please upgrade your server software or install older Moodle version.";
die();
}
Expand Down
8 changes: 4 additions & 4 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
@ini_set('display_errors', '1');

// Check that PHP is of a sufficient version.
if (version_compare(phpversion(), '5.3.2') < 0) {
if (version_compare(phpversion(), '5.3.3') < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN not move it after installib
echo "Moodle 2.1 or later requires at least PHP 5.3.2 (currently using version $phpversion).<br />";
echo "Moodle 2.5 or later requires at least PHP 5.3.3 (currently using version $phpversion).<br />";
echo "Please upgrade your server software or install older Moodle version.";
die;
}
Expand Down Expand Up @@ -490,7 +490,7 @@


if ($config->stage == INSTALL_ENVIRONMENT or $config->stage == INSTALL_PATHS) {
$version_fail = (version_compare(phpversion(), "5.3.2") < 0);
$version_fail = (version_compare(phpversion(), "5.3.3") < 0);
$curl_fail = ($lang !== 'en' and !extension_loaded('curl')); // needed for lang pack download
$zip_fail = ($lang !== 'en' and !extension_loaded('zip')); // needed for lang pack download

Expand All @@ -503,7 +503,7 @@

echo '<div id="envresult"><dl>';
if ($version_fail) {
$a = (object)array('needed'=>'5.3.2', 'current'=>phpversion());
$a = (object)array('needed'=>'5.3.3', 'current'=>phpversion());
echo '<dt>'.get_string('phpversion', 'install').'</dt><dd>'.get_string('environmentrequireversion', 'admin', $a).'</dd>';
}
if ($curl_fail) {
Expand Down
4 changes: 2 additions & 2 deletions lib/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,10 @@

if (CLI_SCRIPT) {
// sometimes people use different PHP binary for web and CLI, make 100% sure they have the supported PHP version
if (version_compare(phpversion(), '5.3.2') < 0) {
if (version_compare(phpversion(), '5.3.3') < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN NOT move it to later place
echo "Moodle 2.1 or later requires at least PHP 5.3.2 (currently using version $phpversion).\n";
echo "Moodle 2.5 or later requires at least PHP 5.3.3 (currently using version $phpversion).\n";
echo "Some servers may have multiple PHP versions installed, are you using the correct executable?\n";
exit(1);
}
Expand Down

0 comments on commit 0fd23b7

Please sign in to comment.