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 reboot server from whm?

Sometimes we may need to reboot the server for installation or configuration. So, in such a...

How to add MX record in cPanel?

Please refer to the following article to add/change the MX record in cPanel. You need to point...

How to Disable AutoSSL Email Notifications in cPanel?

cPanel provides a free AutoSSL certificate which has the complete automation process. cPanel...

AccuWebHosting.com now offers Softaculous to their VPS clients

When it comes to an Auto Installer script, we've seen big debats 'Softaculous over Fantastico’....

How to Increase Disk Space for a cPanel account in WHM?

Please refer to the below steps to increase the disk space of your account in WHM. Login to...

  • 0 Users Found This Useful

Was this answer helpful?