Skip to content

Commit

Permalink
MDL-53019 php: bump all harcoded versions to new 5.6.5 requirement
Browse files Browse the repository at this point in the history
Moodle 3.2 and up will require PHP >= 5.6.5. Hopefully some day we'll
have this centralized with MDL-39007, just it's not done yet.

Thanks to Stephen Bourget for raising this!
  • Loading branch information
stronk7 committed Jul 4, 2016
1 parent 9f29c65 commit ae96cf6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions admin/cli/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@
define('IGNORE_COMPONENT_CACHE', true);

// Check that PHP is of a sufficient version
if (version_compare(phpversion(), "5.4.4") < 0) {
if (version_compare(phpversion(), "5.6.5") < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN NOT move it after installib
fwrite(STDERR, "Moodle 2.7 or later requires at least PHP 5.4.4 (currently using version $phpversion).\n");
fwrite(STDERR, "Moodle 3.2 or later requires at least PHP 5.6.5 (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 @@ -63,10 +63,10 @@
";

// Check that PHP is of a sufficient version
if (version_compare(phpversion(), "5.4.4") < 0) {
if (version_compare(phpversion(), "5.6.5") < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN NOT move it after installib
fwrite(STDERR, "Moodle 2.7 or later requires at least PHP 5.4.4 (currently using version $phpversion).\n");
fwrite(STDERR, "Moodle 3.2 or later requires at least PHP 5.6.5 (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.4.4') < 0) {
if (version_compare(phpversion(), '5.6.5') < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN NOT move it to later place
echo "Moodle 2.7 or later requires at least PHP 5.4.4 (currently using version $phpversion).<br />";
echo "Moodle 3.2 or later requires at least PHP 5.6.5 (currently using version $phpversion).<br />";
echo "Please upgrade your server software or install older Moodle version.";
die();
}
Expand Down
4 changes: 2 additions & 2 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@
@ini_set('display_errors', '1');

// Check that PHP is of a sufficient version.
if (version_compare(phpversion(), '5.4.4') < 0) {
if (version_compare(phpversion(), '5.6.5') < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN not move it after installib
echo "Moodle 2.7 or later requires at least PHP 5.4.4 (currently using version $phpversion).<br />";
echo "Moodle 3.2 or later requires at least PHP 5.6.5 (currently using version $phpversion).<br />";
echo "Please upgrade your server software or install older Moodle version.";
die;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,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.4.4') < 0) {
if (version_compare(phpversion(), '5.6.5') < 0) {
$phpversion = phpversion();
// do NOT localise - lang strings would not work here and we CAN NOT move it to later place
echo "Moodle 2.7 or later requires at least PHP 5.4.4 (currently using version $phpversion).\n";
echo "Moodle 3.2 or later requires at least PHP 5.6.5 (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 ae96cf6

Please sign in to comment.