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

  • Extract Tar Files to a Different Directory

    Syntax Typical Unix tar syntax: tar -xf file.name.tar -C /path/to/directory GNU/tar syntax: tar xf file.tar -C /path/to/directory tar xf file.tar --directory /path/to/directory Example: Extract files to another directory In this...
  • TOP 50 LINUX COMMANDS

    Linux can be extremely scary. However, it is always great to have your hands on these nifty commands since you will have to use them all the time as a...
  • Laravel 4 – CDN Token Authentication Helper

    For those of you using Laravel 4 and the Webair CDN with Token Authentication, I’ve written a handy little helper so that you can insert the tokenized CDN URL right...
  • How to Create a Self-Signed SSL Certificate

    An SSL certificate is ideal for securing an administration interface, a member’s-only space, an intranet, webmail. etc. It is used is to keep sensitive information sent across the Internet encrypted...