List compiled modules with the PHP CLI
Posted June 29th, 2008 in PHP
The PHP CLI (Command Line Interface) has a number of flags which can be passed to it for executing PHP scripts, getting information about your PHP install and so on. This post looks at how to get a list of the modules compiled into the PHP CLI. Note that depending on the way your distribution/package has compiled PHP, the list of modules available for the webserver and the CLI may be different.
Passing the -m flag to the PHP CLI will show a list of the compiled in modules:
php -m
Example output from PHP 5.1.6 on CentOS 5.0 is as follows (from a default install with a couple of additional modules installed):
[PHP Modules] bz2 calendar ctype curl date dom exif ftp gd gettext gmp hash iconv libxml mime_magic mysql mysqli openssl pcntl pcre PDO pdo_mysql pdo_sqlite posix pspell Reflection session shmop SimpleXML soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter xsl zlib [Zend Modules]
This can be useful for checking to see if a particular module is available.
Recent posts:
- List installed packages with YUM (Tuesday, December 2nd 2008)
- Monthly Roundup - November 2008 (Monday, December 1st 2008)
- Weekly Roundup - December 1st 2008 (Monday, December 1st 2008)
- Installing subversion on CentOS (Sunday, November 30th 2008)
- GoDaddy 99 cent .com domain coupon code (Saturday, November 29th 2008)
- Find the index of a string within a string with Javascript (Friday, November 28th 2008)
Subscribe to RSS Feed / Email / Bookmark / Share
Use the buttons below to subscribe to my RSS feed to be notified next time something is posted, share this post with others, or subscribe by email and have my posts sent in a daily email.
