CentOS Debian Fedora FreeBSD Linux PHP Tips and Tricks Troubleshooting Ubuntu

How to List Compiled PHP Modules from the Command Line

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
 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 curl

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

Related Articles

  • How to List Which Apache 2 Modules are Enabled on CentOS 6.x

    View Loaded Apache Modules Just one command: apachectl -M Or, if you want to view the list in alphabetical order: apachectl -M | sort Or, if you want to view...
  • How to Manage a Linux Server with systemd

    What Operating Systems Have Adopted systemd? CentOS: Yes, by default since CentOS 7 Fedora: Yes, since the release of Fedora 15 RedHat: Yes Debian: Yes, shipped since Debian 7 as...
  • Some useful ‘find’ commands

    The ‘find’ command is quite useful as it helps to identify files with specific permissions, users,groups, size, etc.  Also, it is quite helpful to as it allows to process its results...
  • Basic Linux commands

              In recent years, more people have begun to look into , explore, and try out the many features of Linux based operating System has to offer. One of the...