Difference between revisions of "How to make a php.ini file apply to all subdirectories"

From Acenet Knowledgebase
Jump to: navigation, search
(test)
 
Line 7: Line 7:
 
    
 
    
 
  Related articles:  
 
  Related articles:  
  <a title="How can I change PHP settings?" href="https://esupport.acenet-inc.net/index.php?/Knowledgebase/Article/View/195/0/how-can-i-change-php-settings">How can I change PHP settings?</a> </html> [[Category:PHP]]
+
  <a title="How can I change PHP settings?" href="http://kb.acenet.us/How_can_I_change_PHP_settings">How can I change PHP settings?</a> </html> [[Category:PHP]]

Revision as of 05:40, 4 January 2013

Add the following code to the .htaccess file within your account's public_html folder (if one does not already exist, create one):


suPHP_ConfigPath /home/USERNAME/PATH/TO/INI/

(replacing '/home/USERNAME/PATH/TO/INI/' with the appropriate path to your custom php.ini file)

Properly configured example:


suPHP_ConfigPath /home/example/public_html/shop/php.ini

In the above example, the custom php.ini file is located at:

/home/example/public_html/shop/php.ini and that php.ini file is now recursive which means it will effect all of the web accessible directories within the account and not just the directory it's located in. Related articles: How can I change PHP settings?