How to create PHPINFO file in cPanel.

  • July 7, 2021
  • 0
Hire Vivek Asodariya

What is the phpinfo()?

Outputs large amounts of information about the current state of PHP. This includes information about PHP integration options and extensions, PHP version, server information and environment (if integrated as a module), PHP environment, OS version information, path, master and local values of configuration options, HTTP headers and PHP license.

Because each system is set up differently, phpinfo () is usually used to check configuration settings and predefined variables available on a given system.

phpinfo() is also a valuable debugging tool as it contains all EGPCS (environment, GET, POST, cookie, server) data.

How to create the PHPINFO file?
On the cPanel, you need to create a phpinfo.php file.

You can create a phpinfo.php file in the public_html or html folder. That file will appear with WordPress Files.

What is the use of phpinfo()?
The phpinfo() functions will appear all PHP configuration Information.

After creation phpinfo.php file, you need to add the below code in the phpinfo.php file.

<?php
   echo phpinfo();
?>

How to run phpinfo.php file?

Your site url then slash(/) then phpinfo.php
Ex. https://test.com/phpinfo.php
You need to use your site URL instead of https://test.com.
Note:
In earlier versions of PHP 5.5, parts of the displayed information are disabled when the expose_php configuration setting is set to off. These include PHP and Zend logos and credits.

Leave a Reply

Your email address will not be published. Required fields are marked *