How to create and view phpinfo file in cPanel?

It is a very important and useful function of PHP to return information. It includes information about PHP compilation options and extensive version, server information and environment, PHP environment, OS version information, paths, HTTP headers and the PHP license. Please note that you can get PHP information not only from the browser but also from the command line.

Please refer to the following steps to create a phpinfo file.

  1. Login to cPanel account. Please refer to how to login to cPanel for more details.

  2. Navigate to File Manager and go to the public_html folder.

  3. From the header, choose to Create New File and give the file name phpinfo.php.

  4. Edit phpinfo.php file and insert the below lines in it.

    <?php
    phpinfo();
    ?>
  5. Now, we have created a phpinfo file. So, it is time to view that file. Let’s see how we can view that file.

  6. Kindly go to the browser and write “your IP Address/phpinfo.php” it will return the PHP information like version, environment.

This is how you can create and view the PHPInfo page in Linux.

Related Articles

How to enable PHP error reporting in cPanel?

Please refer to the following article to enable PHP error reporting in cPanel Login to your...

How to Fix WHM/cPanel Temp URL 404 or Not Supported Error?

You can use the cPanel's temporary URL to verify your website before publishing it live. However,...

How to Install IonCube in cPanel/WHM ?

IonCube loader is a free PHP extension uses to decode encrypted PHP files at runtime. Please...

How to increse FTP timeout from WHM/cPanel?

Please refer to the following steps to increase the timeout value for FTP on WHM/cPanel. Login...

How To Decrease Inode Usage In CPanel?

What is Inode? An inode is a data structure that contains the information/metadata of a single...

  • 0 Users Found This Useful

Was this answer helpful?