Re: Multiple .ini-files for PHP
| From: | Richard Lynch | Date: | Thu, 15 Nov 2001 16:06:58 +0000 |
| Subject: | Re: Multiple .ini-files for PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-74729@lists.php.net to get a copy of this message | ||
Stefan wrote:
> Is there a way to have different .ini-files for each VirtualHost?
> Apache is used as webserver
Not really really, but you *CAN* do Apache's include (#include? <Include>?
???...) There's *some* way of including other files anyway, even if I'm
not enough of a guru to know what it is... I think maybe you just type the
pathname of the file in there and it gets sucked in...
So you'd have your master php.ini for the system-wide defaults, and then
for each VirtualHost you can include a php.ini that does:
php_value include_path "./:/home/HOSTNAME/include"
and other php_value, php_flag, and EVEN php_admin_value settings.
!!! S E C U R I T Y A L E R T !!!
NOTE: Since this *IS* being included directly into httpd.conf, allowing
end-users direct access to edit it will give them way, way, way too much
power to mess up your server...
The relative benefits and risks must be assessed for *YOUR* situation, but
if you're an ISP, you would only want to do this with files only *YOU* can
edit, or you'd want to provide an interface to end-users to extremely limit
their editing capabilities somehow.
--
Like music? http://l-i-e.com/artists.htm