How can I view my php settings using a phpinfo page ?
In this tutorial:
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(); ?>
How to Create a phpinfo Page
If you're not familiar with how to create a php page, follow the steps below to create a phpinfo page using your File Manager.
- 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.
How to View your PHP Settings
- You can now access this page from your browser. If you created the file in your public_html folder, then you would visit http://YourDomain.com/phpinfo.php. The results should look similar to the below screenshot:
- To find the specific value of a setting, search the page for what you're looking for. In this case, we used our browser's search feature ( Ctrl + f ) and searched for memory_limit. The first value you see is what is set for the current directory (local value), and the setting value is the master value. The local value is the actual setting and is the important value, because the local values will override the master value:
Please note that your phpinfo page has many php settings that you don't want to broadcast to the world. When you're finished using the file, be sure to delete it. Another route you can take instead of deleting it however is naming the file something other than phpinfo.php. As phpinfo.php is such a common name, 'bots' on the web will randomly search for files named phpinfo.php. Setting the file name to something like 9823592374823.php would never be guessed by a bot (so no one would ever find it) however it may be difficult for you to remeber this in the future.
If you need to change any of these values, please see our article: How to update your local php settings
Dedicated PHP Hosting
InMotion dedicated servers come with PHP. A popular programming language used by many CMS platforms. If you are interested in running your own server, read more about our dedicated hosting plans.
Support Center Login
Social Media Login
2015-02-17 8:51 am
Please let me know how can i check that Email service is enabled or not in my server. I have print phpinfo() function and it show whole detail LIKE- sendmail_from, sendmail_path.
But how i know my email service is working or not ?
2015-02-17 12:02 pm
The phpinfo would not inform you if the email service is working, for that please contact your hosts technical department to have them check the mail logs to be sure the service is working.
2015-05-29 7:48 pm
Excellent video! Thank you; this gave me the exact instructions that I needed to configure my site!
2015-07-29 9:18 am
We would need more information about what you're doing in order to determine how to help you. If you're following the directions in the article above, the phpinfo page will appear.
2016-01-26 2:34 am
I have a problems with my current hosting contract because it is not possible to connect to paypal sandbox environment since paypal has recently changed the protocols .Right now, TLSv1.2 and http 1.1 are required.
The limitations of my current hosting is that the curl version is 7.20 and we need to have 7.34 and above.
Please, could you tell me the overall php characteristivs provided by phpoinfo(). What is the culr version ?
It is very important for us because we are looking for a new hosting service.
2016-01-26 7:15 pm
All of the printed data available in the phpinfo file are too numerous to list here. I recommend checking the official PHP documentation if you need more information. If you have a VPS account with us we can work with you to get cURL to whatever specifications you require.