Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to get a list of installed php extensions on Debian? Is there any simple way to find which extensions exist in debian php packages and which have to be compiled manually (actually three lists would be useful: all enabled extensions, all installed extensions, enabled and not enabled, all extensions available as deb packages for a given debian version)?

share|improve this question
add comment

1 Answer

Not entirely sure about what you're trying to accomplish, but it seems like this will do the trick:

dpkg -l | grep php

To search for PHP packages that are available in apt, you can do something like this:

apt-cache search php | grep '^php'

Invoking the following will give you a list of modules that are currently loaded in the PHP runtime (including built-in modules), but it will be limited to the CLI version, not the webserver module for PHP per se:

php -m

Invoking phpinfo() from a PHP script will give you more extensive information.

share|improve this answer
    
"dpkg -l | grep php" would if all php extensions where packed as deb packages, but AFAIK that is not the case. If I'm not wrong some of the extensions have to be enabled in php.ini first even if they are installed on the system (do tell me if I'm wrong). –  helcim May 7 '12 at 13:29
    
So my question is really about three things: the extensions which were installed via debian php packages, the extensions which are enabled in webserver (phpinfo() is the answer here, indeed) and all php extensions which are available as deb packages. –  helcim May 7 '12 at 13:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.