Checking PHP Modules on Hosting
The PHP engine, in addition to the core language functions, extends its functionality with additional modules. These modules may be installed, or they may not be installed. Furthermore, installed modules can be disabled and not working.
A significant amount of the functionality
we are accustomed to is implemented through modules.
For example, working with JSON, working with XML,
the CURL library. Even working with mb_
functions works through modules.
On a local server, typically, most of the modules we need will be installed out of the box. But on hosting, some modules might be missing. Or they might be disabled. This is done to save hosting resources.
To check if a module is enabled, you need to execute the following command:
<?php
phpinfo();
?>
As a result, a page with the PHP configuration will be output to the browser. We can use the page search to find the module we need and see if it is enabled or not.
Let's practice doing this in the following tasks:
Check if the json module is enabled.
Check if the xml module is enabled.
Check if the zip module is enabled.
Check if the curl module is enabled.
Check if the mbstring module is enabled.