PHP Info. Server parameters. Server information. Phpinfo file. Run phpinfo Tutorials, Utilities and web tools

How to display server information and parameters

Sometimes, we need to know the PHP interpreter information and parameters of our web server. Knowing these parameters helps us to determine the status of the server, the possible causes of some problems and as information necessary to be able to configure the server correctly depending on our needs.

If we don’t know how to access this information, we need to resort to asking our Hosting provider or accessing our Web Hosting dashboard. To simplify this task, here’s how to view all the PHP interpreter information on the server.

PHP INFO

Within the PHP language, there is a specific function to display all server information. This function is called phpinfo

In order to implement the function we must do the following:

Create a file with the .php extension and name it that identifies it, for example “phpinfo”. It can be done via FTP or the File Manager of the Hosting dashboard.

Edit the contents of the file and insert the following code:

<?php phpinfo(); ?>

Save the changes and save the file inside the home directory of the website (On most servers it is usually the httpdocsdirectory).

Run the created file by typing in the browser the path of the file with its extension. Example: www.midominio.com/phpinfo.php

Note: Replace “midominio.com” with the name of the domain where the file you created is hosted.

If you’ve done the steps correctly, running the file gives you content similar to the one shown below:

PHP Info

What if you have followed all the steps correctly but running the file displays a blank screen?

On some servers, for security reasons the phpinfo() function is disabled,for that reason if you try to run the function, a blank screen will appear.

In that case, in order to enable the feature, you’ll need to contact your Web Hosting provider to enable the phpinfo() function and successfully run it from the file you created by following the steps in this tutorial.

Download file with PHP info function

We have prepared for you a PHP file with the phpinfo() function by following all the steps indicated in this article. If you wish you can download the file and use it on your website.

Artículos relacionados

This website uses both its own and third-party cookies to measure visits and sources of web traffic. The legal basis is the user's consent, except in the case of basic cookies, which are essential to navigate this website.
Need help? Chat with us
Please accept our Data Privacy and Polcily before starting the conversation.

COVID-19

All information about our availability and service during alarm state for COVID-19 crisis