Override PHP defaults with a custom php.ini

QTH.com allows customers to override the server's default PHP settings. This is done by creating your own custom php.ini. Here's how:

1) Log into your account via SSH.

2) Move into the directory where the website exists that you want to alter PHP settings for. If the website is your main site, it will be located in the public_html directory.

3) Issue a copy command to copy the server's php.ini file into your account. Use the following command: cp /usr/local/lib/php.ini php.ini

4) Change the permissions on this new file to 600 to secure it, using the following command: chmod 600 php.ini

5) Edit the php.ini file, using your favorite editor, to customize PHP as you require, and save.

6) Optionally, you can tell the server to use this new php.ini file for any scripts that reside in a subdirectory. If you do not do this, then scripts in subdirectories will use the server's default php.ini instead. To use your new php.ini for all subdirectories, add this to your .htaccess file:

<IfModule mod_suphp.c>
     suPHP_ConfigPath /home/USERNAME/public_html/
</IfModule>

This assumes that you put your new php.ini into your public_html directory... if not, adjust the path accordingly. Of course, replace USERNAME with your own web hosting username.

If you prefer to have us do this work for you instead, just contact us and let us know.
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

Seeing list of files, not home page

Like all linux-based web servers, your 'home page' must be named index.htm or index.html,...

Add-on Domains

Most of our web hosting packages allow you to have multiple domain names. The additional domains...

Parked Domains

Most of our web hosting packages allow you to have multiple domain names. The additional domains...

Setup E-mail Forwarding

The process of setting up e-mail forwarding depends on whether you are using the free e-mail...

Get Web Hosting and EMail Instructions resent to you

When you first signed up for Web Hosting service with QTH.com, you would have received an email...