How to check my php settings using a phpinfo page ?

Started by Rahul Sambre, July 07, 2016, 04:14:40 PM

Previous topic - Next topic

Rahul Sambre

Hi,

PHP has many environmental variables that you are able to update as needed. For example, you may need to update your php memory_limit to prevent certain scripts from running out of memory. In order to change these values, you must first be able to see what they are. To do that, you will need to create a phpinfo page. A phpinfo page shows you all of your php environment settings.

A phpinfo page is simply a php page with the below code.

Quote<?php
phpinfo();
?>

Follow below steps to create phpinfo page using file manager.

1) Log into your cPanel.
2) Open your File Manager.
3) We are viewing the php settings for our main domain, so open the public_html folder.
4) Click on new file.
5) When prompted for the file name, enter phpinfo.php.
6) Open the phpinfo.php and add below code.

Quote<?php
phpinfo();
?>

Then click on save changes and open it in a browser, URL should be "yourwebsite.com/phpinfo.php" and it will give all the information which is related to PHP which is compiled on your shared hosting server.

That's all  :)