Knowledgebase:
How to setup a custom php.ini file?
Posted by RAJU K, Last modified by Gangadhar G on 09 January 2013 04:39 AM

What is php.ini?

PHP.ini is very important configuration file for PHP that is used to customize behavior of PHP at runtime.

This tutorial will show you how to setup your own php.ini file, explain some of the most commonly changed configuration settings, and how to modify those settings to your needs.

PHP Default settings:

The server is already configured with standard settings for PHP that have been selected by our administrators to be the most optimal setting for a majority of our customers. Unless you specifically need to change one or more of the settings, there is no need to create or modify a php.ini file. If the php.ini file does not exist in your account, then your site will use the default PHP settings defined on the server.

Customising php.ini file:

It is best if you have a copy of the custom php.ini file in your cPanel Home directory (/home/username/) and then make changes to that file.

Keep your custom php.ini file in location /home/username/php.ini  and then add below code to your primary .htaccess (/home/username/public_html/.htaccess)

 

suPHP_ConfigPath /home/username/php.ini

 

Be sure to replace "username" with your actual cPanel user name and don't forget to add php.ini file path to .htaccess file.

Note: You do not need multiple php.ini files in your folders. Keep only one custom php.ini file in /home/username/php.ini


Common php.ini settings for wordpress,joomla and other PHP applications: 

The common settings are upload directory, register global variables, display errors, log errors, max uploading size setting, maximum time to execute a script and other configurations is written in this file.

upload_max_filesize = 10M
post_max_size = 10M
max_execution_time = 30
memory_limit = 64M
register_globals = Off
magic_quotes_gpc = Off
safe_mode = off

Please check Optimal PHP Settings on our servers.

 

NOTE: FastWebHost cannot know why you want nor need to change these settings. You are changing this at the advice of your web designer or the developer of your script. We can only show you where and how to make the change. Please contact our support if you require further assistance.

Best wishes,

FastWebHost Support Team


Comments (1)
John Malanga
12 September 2012 09:19 AM
I received an email about changes to PHP.INI file configuration. I have no idea what this means or what, if anything, I need to do. I do know that I can no longer publish my website because my password no longer is valid.
I am not sure if this problem is related to the PHP.INI changes. I need help.
Thanks, John
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).