Find out loaded loaded PHP modules and its compiled in features

  • 7002029
  • 28-Nov-2008
  • 27-Apr-2012

Environment

Novell Open Enterprise Server (Linux based)
Novell SUSE Linux Enterprise Server 10 Support Pack 1
Novell SUSE Linux Enterprise Server 10 Support Pack 2
Novell SUSE Linux Enterprise Server 9 Support Pack 1
Novell SUSE Linux Enterprise Server 9 Support Pack 2
Novell SUSE Linux Enterprise Server 9 Support Pack 3
Novell SUSE Linux Enterprise Server 9 Support Pack 4

Situation

You are running PHP and want to find out which modules are actually loaded and/or which features inside the modules can be used.

Resolution

You can use the command line and simply type:
php -i
There is also a dedicated function in PHP called phpinfo() which shows this as an HTML page. Create a file with the extension .php and insert these lines of code:
<?php
phpinfo();
?>
You can now view this page with a browser through Apache.

Note: if you want to add PHP modules you only have to install them and restart Apache with rcapache restart. PHP will automatically load the new modules.