Use a Custom PHP.ini File
Posted by on 21 January 2014 11:40 PM
There are several instances that may require you to modify a setting in the php.ini file for your website, such as increasing the PHP upload limit. We definitely permit the use of a custom php.ini file, but there are some requirements involved just to ensure that the files work as expected.
Why create a custom php.ini file?
Some examples of what may be changed by using a custom php.ini file are:
Discover the Handler
Before a custom PHP directive can be set, the PHP handler needs to be determined, so that the correct method can be used. To find out your PHP handler:
Create Custom PHP.ini with suPHP
To begin creating your very own custom php.ini file:
Once you have completed the above steps your php.ini file will be active. You will now be able to make edits to the custom php.ini. Your edits will only affect directories below the .htaccess file in which you referenced the file.
Create Custom PHP.ini with DSO
On the DSO server, directives should be placed in the .htaccess file for the directory to which they should apply. In most cases, this will be '/home/USER/public_html/ where USER is your cPanel username.
php_flag magic_quotes_gpc off
php_value memory_limit 256M