-
Bug
-
Resolution: Fixed
-
Minor
-
3.2
-
MOODLE_32_STABLE
-
MOODLE_32_STABLE
-
MDL-56167-master -
- Switch your webserver to php54
- Attempt to access any page on Moodle
- You should get an (ugly) error which at least tells you to upgrade to higher php version
Expected:
- A nice moodle error about being on too low a verison
Actual:
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /Users/danp/moodles/im/moodle/mod/forum/deprecatedlib.php on line 191
|
Fix:
diff --git a/lib/setup.php b/lib/setup.php
|
index bc0b759042..c55c0f3d82 100644
|
--- a/lib/setup.php
|
+++ b/lib/setup.php
|
@@ -338,8 +338,6 @@ if (file_exists("$CFG->dataroot/climaintenance.html")) {
|
}
|
}
|
|
-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.6.5') < 0) {
|
$phpversion = phpversion();
|
// do NOT localise - lang strings would not work here and we CAN NOT move it to later place
|
@@ -347,7 +345,6 @@ if (CLI_SCRIPT) {
|
echo "Some servers may have multiple PHP versions installed, are you using the correct executable?\n";
|
exit(1);
|
}
|
-}
|
|
// Detect ajax scripts - they are similar to CLI because we can not redirect, output html, etc.
|
if (!defined('AJAX_SCRIPT')) {
|
TODO: workout why we only do that in CLI_SCRIPT..
- has a non-specific relationship to
-
MDL-44276 When upgrading to Moodle 2.6, if PHP version is below 5.3, install does not fail gracefully
- Closed