Blog

VPS: How to list compiled PHP modules from SSH

This article provides you with information on how to list compiled PHP modules via SSH on your VPS server. 

 

 

To check which modules are available for the different versions by calling the different PHP versions directly.

On one of 1-grid’s Fully Managed VPS servers running CentOS 7, the full path would be as follows.

 

root@host [~]# /opt/cpanel/ea-php73/root/usr/bin/php-cgi

So, if I run that command with the -m flag, it then provides us will all the modules specifically for PHP 7.3. If you switch the 

path to ea-php72 or 56, then it would give the modules for that PHP version.

 

 

root@host [~]# /opt/cpanel/ea-php73/root/usr/bin/php-cgi -m
[PHP Modules]
bcmath
bz2
cgi-fcgi
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
hash
iconv
imagick
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
SPL
sqlite3
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]

root@host [~]# 

On a Fully Managed VPS server, the full path would be as follows.

 

root@host [~]# /opt/remi/php73/root/usr/bin/php-cgi

Or, you can use the built-in shortcut commands.

 

root@host [~]# php73 -m

root@host [~]# php56 -m

root@host [~]# php54 -m

Was this post helpful?