1

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)?

1 Answer 1

8

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.

2
  • 1
    "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, 2012 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, 2012 at 13:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .