phpinfo.php is a page that can show you the current PHP informations for your server, such as:
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.)
// Show all information, defaults to INFO_ALL
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.