14 March 2018 | 1 min read

Create a phpinfo() page via terminal

Outputs information about PHP's configuration in single page

Normally, during development we need to install few PHP extension and need to check if it already installed before or not. The easier way is to check via phpinfo() output. Please read manual - phpinfo if you want to know more.

But normally during production we do not display to public as prevention from script kiddies

$ echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/phpinfo.php

So you need to delete after get the information. Otherwise, just you also can check PHP modules via php -m or php -i from terminal.

Robbi Nespu | Bash, Linux, Php

Discussion and feedback