- Log into your cPanel.
- Open your File Manager.
- Navigate to the directory you are working with. This is important because each folder can actually be set to have different php settings. In this example, we are viewing the php settings for our main domain, so we are navigating to the public_html folder.
- In the top menu, click New File.
- When prompted for the file name, enter phpinfo.php (it can actually be named anything, phpinfo.php is simply a common name for the file).
- Find the phpinfo.php file in your list of files (it should have automatically updated). Right click on it and choose “Edit”. If you see a “Text Editor” prompt, choose “utf-8” from the drop down list and then click “Edit”.
- Enter the following text:
<? phpinfo(); ?>
Then click Save Changes.
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 following code:
<? phpinfo(); ?>