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

  • A Basic Overview of the Vim Text Editor

    Many articles in our Webair Community advise editing configuration files. We usually recommend using your preferred text editor. I personally prefer vim. Vim, or its older sibling vi, are installed...
  • Prevent hot linking of images.

    Hot linking is displaying an image on a website by linking to the same image on another website, rather than saving a copy of it on the website on which...
  • LAMP STACK

    What is a LAMP Stack? “LAMP stack is a popular open source web platform commonly used to run dynamic web sites and servers. It includes Linux, Apache, MySQL, and PHP/Python/Perl...
  • Top Open Source applications.

    These are a collection of some useful Open Source office application that are helpful by increasing productivity. Often a person would be limited in buying an expensive piece of software...