Difference between revisions of "How to make a php.ini file apply to all subdirectories"
From Acenet Knowledgebase
Docs admin (Talk | contribs) |
Docs admin (Talk | contribs) |
||
Line 13: | Line 13: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
<IfModule mod_suphp.c> | <IfModule mod_suphp.c> | ||
− | suPHP_ConfigPath /home/example/public_html/shop/ | + | suPHP_ConfigPath /home/example/public_html/shop/ |
</IfModule> | </IfModule> | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 16:02, 21 February 2013
Add the following code to the .htaccess file within your account's public_html folder (if one does not already exist, create one):
<IfModule mod_suphp.c>
suPHP_ConfigPath /home/USERNAME/PATH/TO/INI/
</IfModule>
(replacing '/home/USERNAME/PATH/TO/INI/' with the appropriate path to your custom php.ini file)
Properly configured example:
<IfModule mod_suphp.c>
suPHP_ConfigPath /home/example/public_html/shop/
</IfModule>
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: