How to create a PHP info page
What is a PHP info file? A PHP info file is a simple and quick setup that offers a wealth of information about the hosting environment and the PHP version being utilized. It includes details such as the PHP version, configuration files, active modules, and maximum request sizes.
Creating a PHP info file
To follow this guide, you should already have an HTTP(s) server set up and configured to execute PHP files, such as Nginx or Apache.
1) Access the web route of your HTTP(s) server, which is the top-level folder from which your server serves files. In this example, we will use the default Nginx web root:
2) Create a file called phpinfo.php using the touch command:
3) Open the phpinfo.php file using your preferred text editor (e.g., Nano, which is commonly installed by default on most systems), and add the following lines of code:
4) Save the changes to the file.
5) Access the following URL in your web browser, replacing “my_server_ip” with the IP address of your server:
By accessing this URL, you should now see the PHP information displayed in your browser.
The first table list various bits of information about the php install. The subsequent tables list the configuration for each of the included PHP modules.