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(); ?>

Creating 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.

  1. Log into your cPanel.
  2. Open your File Manager.
  3. 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.
  4. In the top menu, click New File.
  5. 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).
  6. 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".
  7. Enter the following text:
    <? phpinfo(); ?>
    Then click Save Changes.

Viewing your PHP Settings

  1. 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:
    this-is-what-a-phpinfo-file-loos-like
  2. 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:

    this-is-a-phpinfo-page-showing-the-memory_limit-setting

    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.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Related Questions

Here are a few questions related to this article that our customers have asked:
My PHP code is not running on XAMPP
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!