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

  • Setting files as immutable.

    Wouldn’t it be nice if we can set files so that even root cannot modify or delete it ? Both FreeBSD and Linux come with commands that allows us to...
  • Redis install steps on FreeBSD

      Install redis FreeBSD port collection: $ cd /usr/ports/databases/redis/ && make install clean # or with portmaster $ portmaster databases/redis   ===>  CONFIGURATION NOTE:   To setup “redis” you need...
  • Fixing a corrupt VHD file – Hyper-V

      Error message – Failed to open attachment ‘C:\ vhddir \MyVHD.vhd’. Error: ‘The file or directory is corrupted and unreadable.’” There could be many possible causes why your VHD may...
  • Using Top [ $top ]

    What is Top? Top provides a live display of information on the CPU processes. Top gets updated periodically as it provides an output CPU level percentage, Memory size, Swap Info,...