How to check what PHP modules are installed using the PHP command line utility.
Check for Installed PHP Modules
- SSH into the server
- Run the following command on the server
php -m- The output will be all PHP Modules that are installed
EXAMPLE:[~]# php -m
TIP: This will show the modules installed on the server's default PHP version. The servers default PHP version can be found using
[PHP Modules]
bcmath
calendar
Core
ctype
curl
date
dom
ereg
filter
ftp
gdphp -v - To search out a specific module use
grepto search out the module using
php -m | grep [module_name]EXAMPLE:[~]# php -m | grep mbstring mbstring - Check a specific PHP version's modules using the full path to PHP
[/]# /opt/cpanel/ea-php81/root/usr/bin/php -m
EXAMPLE: The following image shows that the module mcrypt is installed on PHP 7.4, but not PHP 8.1.
- The output will be all PHP Modules that are installed
Comments
0 comments
Article is closed for comments.