Getting started · Let.com knowledge base

How to Make a phpinfo.php File to Test PHP Settings

Updated 2024-08-222 min read

Hosting documentation. Account access is coming soon. Always use the server details and nameservers assigned to your own account.

All of the global and local settings for PHP can be easily displayed in a browser by creating a phpinfo.php file in the document root of your website. This is helpful to display the current values, or to change them using the MultiPHP INI Editor. For more information on the MultiPHP INI Editor check out this article: Link to MultiPHP INI Editor 

    

To create a phpinfo.php file:

1. Login to cPanel.

 

2. Go to File Manager and navigate to your document root folder for your website. If this is the primary domain, it would usually be your public_html folder. If this is an addon domain, it would usually be a folder within public_html with the name of the domain. 

 

3. Create a new file called phpinfo.php

 

4. Enter this small amount of PHP code exactly and Save Changes:

<?php

phpinfo();

?>

 

5. Load your domain in a web browser, followed by phpinfo.php. E.G example.com/phpinfo.php

 

6. A page will display default PHP settings, PHP version, and other useful information about the server.Screenshot_2020-11-23_at_8.43.54_AM.png

 

7. In the Configuration section, all of the PHP modules are displayed, such as apcu, bcmath, bz2, etc.

Screenshot_2020-11-23_at_8.46.19_AM.png

8. In the Core section, the PHP version will be displayed, followed by the values for each PHP directive.  

blobid0.png

blobid1.png

Local Value: Displays the overriding value for that site. The Master Value and Local Value should be the same if no changes have been made. If changes have been made, the website will always load the information from the Local Value.

Master Value: Displays the default value selected for the server. If you made changes to the Local Value, then the Local Value will always have precedence over the Master Value.

 

9. If you made any changes to directives such as max_execution time in the MultiPHP INI Editor in cPanel, they should show up here immediately.

 

NOTE: The phpinfo.php file should be deleted after being used for testing, for security reasons. This file displays a lot of information about the settings being used for your site, and this information should not be available for the world to see!

 

Did this point you in the right direction?

Talk to the Let.com team

Frequently asked questions

What you need to know.

Talk to our team

What information does a phpinfo page show?

It displays the active PHP version, configuration values and available modules for the website where the file is served.

What is the difference between Local Value and Master Value?

Master Value is the server default. Local Value is the setting applied to the site, including any local override, and takes precedence for that site.

Should I leave the phpinfo file on the site after testing?

No. The guide says to delete it after testing because it exposes detailed information about the website’s PHP and server configuration.

Let.com

Coming soon.

Account sign-up, log-in and checkout are not available yet. You can explore our products and compare plans while we get everything ready.

Compare plans