How to enable php setting for all Directories

If you want enable some php related setting by using php.ini file and it reflect to all  other directories which is under your account. Then follow the steps..
First create php.ini file under the document root of your domain and change or add the default setting which you want or which is required for your domain.
for example :
allow_url_fopen = On
allow_url_include = On

then you need to add the following code in your .htaccess file. So you dont need to copy the php.ini file in each directories for chnages to reflect.
SetEnv PHPRC “/home/username/public_html”


Note: Please replace user name is equal to original domain username.

Leave a Comment