IndianWebPortal.com

Something Different In Linux

Home » htaccess » How to enable php setting for all Directories

How to enable php setting for all Directories

Posted by Rishikesh Vispute Categories: htaccess, PHP

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.


Popular Posts

remove index.php fro

How to remove index.php from url in magento Ans : If you ...

PHP-Java bridge on p

  What is php-java bridge? The php-java bridge is the php ...

Set expiration for y

If you want to set the expiration to your site ...

Warning: Parameter 1

Error: Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a ...

domain pointing to e

If you domain uses external MX record and it is ...