Site icon VipsPatel

How to List Compiled PHP Modules from Command Line

Pre-Flight Check

The general command is php -m; this command will give you the full list of extensions:

php -m

This command will give you an output like:

bz2
calendar
Core
ctype
curl
date
ereg
exif
fileinfo
filter
ftp
gettext
gmp
hash
iconv
json
libxml
mongo
openssl
pcntl
pcre
Phar
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
tokenizer
xml
zip
zlib

If you’re looking for one particular item then use a pipe and the grep command:

php -m | grep -i mongo

In the case above, I “grep’d” looking for the PHP module mongo ; replace mongo with the name of the module you’re searching for!

Want to Try This Tutorial?

Launch a Free* Storm Server

*For new customers only

<!– –><!– –>

Thank you. Your request has been submitted and we’ll be sending you a $75 Storm coupon shortly!

Exit mobile version