Php.ini with suPHP in .htaccess

My server uses suPHP, so each website has its own php.ini file. My host recommended adding the following to the .htaccess file:

<IfModule mod_suphp.c>
suPHP_ConfigPath /home/user/public_html
</IfModule>

This basically points to the php.ini file of the site. However, I am trying to have a standard .htaccess file on all sites that I donโ€™t need to edit, mainly part of my "template" site from which I start working. I tried to change the above:

<IfModule mod_suphp.c>
suPHP_ConfigPath %{DOCUMENT_ROOT}/public_html
</IfModule>

But that does not work. As you can tell, I probably don't understand how it all works. Can someone help me with the above code, so I donโ€™t need to specify the exact path for each .htaccess file and get Apache to work out the path to the php.ini file?

I hope this makes sense, it's a little hard to explain!

+3
1

suphp Qs. mod_suphp , % {DOCUMENT_ROOT} . , , suPHP , DOCUMENT_ROOT , DocumentRoot .

, . DOCUMENT_ROOT_REAL, , , - PHP_DOCUMENT_ROOT. phpinfo(), , . .htaccess

suPHP_ConfigPath %{ENV:DOCUMENT_ROOT_REAL}/_private

.

+3
source

All Articles