/ Web Development / PHP

Article ID:  00184
Rating:  5.0 / 5.0 (2 votes)
Views:  2045
Created:  Jun-19-2006

Rating
Did you find this article helpful?


Email Article To A Friend

Print Article


Applying custom php.ini to subfolders with suPHP

Issue

I notice that a folder within my site is not applying the custom php.ini file I created. I need to apply my custom php.ini file to all subfolders, how do I do this?

Solution

You should remove the lines that begin with "php_value" and "php_flag". You will need to move these files to a file named php.ini and upload php.ini into your public_html directory. Then, add the following line into the .htaccess file in your public_html:

suPHP_ConfigPath /home/username/domains/yourdomain.com/public_html

where "username" is your siteadmin username. You will need to remove php_value and php_flag from ALL .htaccess files you may have. However, you only need to add the suPHP_ConfigPath line in the .htaccess file in your public_html directory only.

Please note that you will need to change the format of your php_value and php_flag lines into the php.ini format. (Refer to the FAQ entry on how your php.ini file should be formatted).

Related Articles