I need a way to find all the available PHP extensions whether they are loaded or not. I looked at How do I see the extensions loaded by PHP? but it only explains how to find loaded extensions. I want a way to find unloaded extensions also.
Knowing the extension_dir from php.ini I did a ls /extension_dir/*.so
which returned 26 entries. When I tried with php -m
, I got 57 entries. How is it possible?
How do I know which PHP extensions are available to be loaded? I don't want to know which are loaded but which are loadable.
Keep in mind that some extensions may be build statically into PHP. You will see these listed as extensions in php.ini but you will not be able to disable them, and in most cases you will not see an extension= line referring to them in php.ini or an .so / .DLL files. Removing statically compiled extensions requires recompiling PHP itself, and in most cases this is hardly needed as most statically compiled extensions tend to include core functionality which rarely needs to be removed.
http://arr.gr/blog/2012/06/on-php-extensions/
Thanks goes to Matteo Tassinari.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With