Moodle 3.2 or later requires at least php 5.6.5

Posted on

In this article, we will discuss an error produced while installing Moodle version 3.2. As we already known before, Moodle is an open-source learning platform which for further reference can be visited in this link, or specifically in this link for downloading the latest release of Moodle. But to be more cautious, it is best to search the document within the Moodle official website for the requirements needed to run Moodle smoothly. It involves the version of PHP needed by Moodle to be able to be executed. If the version is not suitable with the Moodle which is going to be installed, it will generate the error as specified in the title such as ‘Moodle 3.2 or later requires at least PHP 5.6.5. The error generated can be shown in the following image :

As it can be seen in the above image output, the version of Moodle which is going to be installed is 3.2 and it needs at least PHP version 5.6.5. So, Apache Webserver as the web server responsible for retrieving the request from the client accessing Moodle must be configured so that it has the available module supporting PHP version 5.6.5.

Make sure that the PHP version installed is at least 5.6.5. So, first of all check the version of the PHP installed. There are several ways to do that, the first one is by executing the following command and it is done in the command line :

php --version

Below is the output if the above command executed in the command line :

user@hostname:~$ php --version
PHP 7.0.11-1+deb.sury.org~xenial+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.11-1+deb.sury.org~xenial+1, Copyright (c) 1999-2016, by Zend Technologies
user@hostname:~$ 

The above is the output of command execution specifically in another environment where Moodle 3.2 has already been successfully installed.

Another way which can be taken for retrieving the version of PHP installed is by creating a PHP web-based script with the following content inside the script :

<?php
phpinfo();
?>

Place it in Apache Webserver web directory, usually in ‘/var/www/html’ or any directory which is stated as the DocumentRoot directory in Apache Webserver configuration file. Execute it and on the page the version of PHP installed will be informed.

Leave a Reply