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

Comments are closed.

Niklas Tech Blog
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.