PHP check what modules are installed (cli)

I move around a lot between servers in my line of work so a quick way to see what modules are installed is very valuable. You can of course use the built in phpinfo() function but that requires a browser and web server. A quicker way for me is to use the command line interface.

Simply input on the command line:

php -m

and all the installed modules will be displayed.

Example output:

[PHP Modules]
bz2
calendar
ctype
curl
date
dbase
exif
ftp
gettext
gmp
hash
iconv
libxml
mime_magic
mqseries
openssl
pcntl
pcre
posix
pspell
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlrpczlib

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">

This site uses Akismet to reduce spam. Learn how your comment data is processed.