There was a problem loading the comments.

How To Create A phpinfo.php Page

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

phpinfo.php is a page that can show you the current PHP informations for your server, such as:

  1. Information about PHP compilation options and extensions
  2. PHP version
  3. Server information and environment (if compiled as a module)
  4. PHP environment
  5. OS version information, paths, master and local values of configuration options
  6. HTTP headers
  7. PHP license

This page is commonly used to see the PHP Configuration settings and the pre-defined values on your system. It is also used as a debugging tool.

To create a phpinfo.php for your website, First login to your cPanel account. (Don’t know how to login to your cPanel account? Click here)

Once you are on the cPanel Main Screen, locate and click on “File Manager” under the Files Section.

Inside the File Manager, go to the directory where your website files are stored. For example, public_html as this is the default directory.

Click on the “+File” on the top left corner to add new file inside the website’s directory.

Enter the filename “phpinfo.php” on the New File Name field and click on “Create New File” button.

Once done, locate the file from the website directory and right click on it then click “Edit”.

You will be redirected on a page where you can enter the script for phpinfo.php and then click on “Save Changes” on the top right corner and click “Close”. (See script below.)

_________________________________

 

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>

__________________________________

When you are done, you can access the page using a browser. Just type in your website’s domain name, for example; domain.com/phpinfo.php and you will be redirected to the page where you will see all the informations for your PHP configurations and settings.


Share via
Thank you for your feedback on this article.

Related Articles


Self-Hosted Help Desk Software by SupportPal
© Host4u Limited