You should not need to check the PHP info file very often – if ever. But as an administrator it is useful to know where to find it and what it contains.

To view the PHP info file, go to Site administration > Server > PHP info

 

 

What is the PHP info file?

This is a file that will tell you all about how PHP is set up on your server.

PHP is the application that runs in the background on your server that makes Moodle work. It converts all the PHP code into what you see on the screen when you use Moodle.

When you first view PHP info, it looks like a complicated mess of tables with lots of information that is actually useful.

PHP Version

Knowing which version of PHP you are using is important as upgrading Moodle to a newer version may require an upgrade in the PHP version. This is because some PHP functions can be deprecated and some new functions may be used that are only available in the next version of PHP.

Extensions

The way PHP works is that it is made up of extensions. These extensions allow PHP to provide particular functions. In the case of Moodle it needs a certain collection of extensions to work correctly.

The list of extensions that Moodle 3.7.x requires can be found here. https://docs.moodle.org/37/en/PHP#PHP_Extensions_and_libraries

If you look through the PHP info file you can see the names of the extensions followed by a table with the settings for that module. For example you could look for MBString or CURL.

PHP configuration files

One extremely useful collection of information is which php.ini file is being used for PHP. If you need to make a change to PHP then looking for Configuration File (php.ini) Path will show you where to find the PHP.ini file that is being used for Moodle’s PHP.

This will also tell you if other files are being used for configuration. In this case additional files in the 7.2/conf.d folder are used as part of the config instructions.

Apache Environment

There is information about the environment that PHP runs on that is also helpful to know.

  1. Server Software. This is telling us that Moodle is running on an Apache 2.4.33 server on Unix – with PHP 7.2.7
  2. The server name is moodle37.laptop.ricoshaeinteractive.com.au
  3. The folder where the server name points to is /User/www/moodle37/moodle

File upload size

One common issue is not being able to upload large files on your server. To find out the maximum file size you can look for the line upload_max_filesize. This will tell you what the maximum file upload size is on your server. This maximum size is controlled by PHP.

PHP Variables

If you are involved in making changes to the PHP code, you may find the PHP Variables information useful to find out what the values are by default for the PHP Variables. If you are not a programmer then this section may be irrelevant.

Hopefully this has given you a useful overview of the PHP info section on your Moodle server.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

[convertkit form=1092962]