Ok, my current host (www.powweb.com) allows each user to eith use the default php settings, OR create their own php.ini file, and put it in their htdocs dir. I'm trying to do something similar with a server I have that will host a few different test sites. How would I go about doing this?
php.ini for each virtual site
there is nothing (that i am aware of) on the server that you need to set to do this. PHP by default will look first for a php.ini in the same dir as the script, if it does not find one it will use the system-wide php.ini path as defined at compile time.
BTW: i'm on powweb too
It seems that this only works with php running as cgi (not as a module). The problem is, I'm running php as a module, and would like to be able to still do this. Does anyone know of a way to do this with php as a module?
This is totally untested, so I don't know whether it will work or not, but make a back-up before you do anything
I currently have PHP4+ and PHP5+ running concurrently by having seperate httpd.conf files. However, apart from running on different ports, the main difference is where I get Apache to look for the php.ini file.
To this end, I have
LoadModule php4_module c:/php/php-4.3.10-Win32/sapi/php4apache2.dll
PHPIniDir "c:\php\php-4.3.10-Win32"
You could try setting your PHPIniDir in your virtual host setup to the location you want.
Like I said, totally untested, but you never know. Would be interested in finding out how youget on.