there’s a command to list all the modules loaded by PHP. Some of the modules would have come with PHP, and some you would have installed.

#php -m

apc
apcu
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd

Using pipe ( | ) and grep command, you can search for a particular module.

php -m | grep gd

In the above example will grep module named gd.

Using phpinfo

It’s possible to list and view all PHP modules via phpinfo() function as well. To do that, create a PHP script with a call to phpinfo().

#vim info.php

Copy & paste the below code.

<?php

phpinfo();

?>

Browse info.php to view all the module information.

 

Was this answer helpful? 0 Users Found This Useful (0 Votes)