How to check php modules with phpinfo

How to check php modules with phpinfo

When PHP modules are unable to load your PHP application then first you find that PHP modules are available or not in your PHP application. To check the PHP modules information with the help of PHP info file.

Phpinfo File:

Phpinfo file contains the information about PHP environment for your server. Phpinfo File contains a large amount of information like PHP version, HTTP headers, PHP environment, Operating system version, paths, define values of a configuration option, server information, and environment, PHP environment, PHP license etc. phpinfo file also contains debugging tools.

How to make phpinfo file:

If you find to PHP modules with the help of phpinfo file then first you need to create a file with the extension of .php. You should know that you don’t save the file name as ‘phpinfo.php’ because attackers can search with that name on the server. You can add following code in your file that is:
PHP:
<? Php
Phpinfo();
?>
By applying this code you get all information about PHP modules is loaded or not and get the list of all modules on your browser. If you want to search modules using CGI or CLI version of PHP then you need to use following code in your file:
PHP:
$ php -m
You got all list of php modules on your prompt.

You can also use the grep command for see that PHP module is available on the command line or not. Use the following command:
PHP:
Php –m | grep –i modulename
You get all module lists on your browser. You can also find a specific module with the help of this command by simply adding the first letter of the module name. And you get information about the specific module that is loaded or not.
Author
Jaishree
Views
3,203
First release
Last update
Rating
0.00 star(s) 0 ratings
Top