PHP is a scripting language used primarily on the web. PHP is highly customizable and has many settings that you will be able to modify if needed for a certain program or application.

How do I view my php settings?

To view your current php settings, create a page titled phpinfo.php with the following code in it:

<? phpinfo(); ?>

The output of the above page is referenced as a 'php info page,' and you can view it by navigating to: domain.com/phpinfo.php (be sure to use our actual domain name). The result of your php info page should look similar to this page:

example of a php info page

How do I modify my php settings?

You can update your local php.ini file in order to make modifications to your php setup.  In your php.ini file, do a search (Ctrl+F in most browsers) to find the directive that you need to modify. A few of the most frequently changed settings are:

max_execution_time = 30
max_input_time = 60
memory_limit = 256M

I will now show you how to modify the php.ini file via the cPanel File Manager:

  1. Login to cPanel
  2. Click the File Manager Button under Files. If the Directory Selection option pops up, select the Web Root, then click the Go buton.
  3. Locate and click the php.ini file, then click the Edit button on top, then in the pop-up window, click the Edit button. You will then see the contents of the php.ini file and be able to edit it. In most browsers, you can click Ctrl+f to search, for example you can seach for "memory".
  4. When I searched, it took me to a line with the code like this:
    view of memory limitation in php.ini file

    memory_limit = 256M

    In this example, I am increasing the PHP memory_limit to 768M, it will look like this when you are done:
    memory_limit = 768M

    view of increased memory

    Click the Save Changes button when you are done. Refresh your php info page, and you should see the changes reflected:
    this is a screenshot of a phpinfo page


I can't find my php.ini file!

The php.ini file by default will be located at public_html/php.ini. If you do not see a file named php.ini in your public_html, please contact our Support Department and we will be happy to add one to your account for you. 

I made changes to the php.ini file, but I do not see the changes!

By default, the php.ini only affects the files in the folder that it is placed in, and not other folders on the account.  In other words, updating your php.ini values in public_html/php.ini will not affect php files in subfolders of your public_html, such as public_html/shop. To correct this problem, you can either:

1. Copy your public_html/php.ini file to each folder
2. Add the following to the top of your public_html/.htaccess file:

suPHP_ConfigPath /home/username/public_html

For example, if your username is userna5, replace username in the above line to userna5. More information can be found in our article How Do I Make My php.ini File Recursive? The .htaccess file is a hidden file, so make sure that hidden files are viewable if you are accessing your files through the cPanel File Manager or via FTP.

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!

Did you find this article helpful?

Comments

2013-07-31 12:09 pm
The link to http://ehub22.webhostinghub.com/phpinfo.php does not work!
Staff
12,339 Points
2013-07-31 6:34 pm
Hello MtKuile,

Thank you for your comment. I have removed the bad link, and added a screenshot instead.

After creating a PHPinfo page, you can view it by navigating to your temp URL and adding /phpinfo.php to the end.

For example:
http://whub32.webhostinghub.com/~usern99/phpinfo.php

If your domain is pointed to our nameservers already, you can also navigate to your website and add /phpinfo.php to the end.

For example:
http://domain.com/phpinfo.php

If you have any further questions, feel free to post them below.
Thank you,

-John-Paul

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.

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 757-416-6627 Chat: Click To Chat Now

Ask the Community

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

Not a Customer?

Get web hosting from a company that is here to help.
}