Error installing Moodle with cPanel

Re: Error installing Moodle with cPanel

by Gordon Bateson -
Number of replies: 0
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

If have seen that error when PHP version is greater than 5.2.8 but less than 5.3. You need the PHP version to be greater than 5.2.8 to run early versions of Moodle 2.x, but there is some PHP syntax that is valid in PHP 5.3 that is not valid in PHP 5.2

The line that causes the error message is this:

  • return $class::get_required_behaviours();

In order to work on PHP 5.2, the above line needs to be rewritten as ...

  • return call_user_func(array($class, 'get_required_behaviours'));

However, even if you fix the above line, there may be other simliar problems waiting down the line, so your best workaround is to upgrade to PHP 5.3.2 or later.

By the way, if you want the HotPot module for Moodle 2.x you will have to install it yourself. You can get it from here:

Gordon