Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'w33_MDL-28381_m22_cliphpver' of git://github.com/skodak…

…/moodle
  • Loading branch information...
commit 065399a11f0231f216f386badf8e8fd8b10607de 2 parents 4abd7a0 + 8de5d7b
Eloy Lafuente (stronk7) stronk7 authored

Showing 1 changed file with 11 additions and 0 deletions. Show diff stats Hide diff stats

  1. +11 0 lib/setup.php
11 lib/setup.php
@@ -183,6 +183,17 @@
183 183 }
184 184 }
185 185
  186 +if (CLI_SCRIPT) {
  187 + // sometimes people use different PHP binary for web and CLI, make 100% sure they have the supported PHP version
  188 + if (version_compare(phpversion(), '5.3.2') < 0) {
  189 + $phpversion = phpversion();
  190 + // do NOT localise - lang strings would not work here and we CAN NOT move it to later place
  191 + echo "Moodle 2.1 or later requires at least PHP 5.3.2 (currently using version $phpversion).\n";
  192 + echo "Some servers may have multiple PHP versions installed, are you using the correct executable?\n";
  193 + exit(1);
  194 + }
  195 +}
  196 +
186 197 // Detect ajax scripts - they are similar to CLI because we can not redirect, output html, etc.
187 198 if (!defined('AJAX_SCRIPT')) {
188 199 define('AJAX_SCRIPT', false);

0 comments on commit 065399a

Please sign in to comment.
Something went wrong with that request. Please try again.