How to make a php.ini file apply to all subdirectories

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:

How to change PHP settings with a php.ini

  • 13 brukere syntes dette svaret var til hjelp
Var dette svaret til hjelp?

Relaterte artikler

How to clear your internet browser's cache

Each internet browser has its own way to clear its cache. There are instructions below on how to...

Securing your Wordpress blog against Hacking

Security is a growing concern with all of the hackers and script kiddies waiting to do bad things...

IPhone or iPad - Setting Up an Email Account

General Configuration [1] Tap the icon (Settings) to begin. [2] Tap 'Mail, Contacts,...

IMAP vs POP3

What is the difference? When you use IMAP you are accessing your inbox on your mail server. IMAP...

How to recover from a hacked website

Acenet's Shared/Managed Server Security Measures Our Technical support staff regularly watches...