Pre-Flight Check
- These instructions are intended specifically for listing compiled PHP modules from the command line.
- I’ll be working from a Liquid Web Core Managed CentOS 6.5 server, and I’ll be logged in as root. That said, these instructions will work on any server where PECL and PEAR are installed.
The general command is
php -m
This command will give you an output like:
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