I have three sites currently running on a W2K8 server under fastcgi, but they are all sharing a common php.ini, within the c:\php\php.ini file.
I have tried to follow the directions here
http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/#Per-site_PHP_configuration
to try and "specifing PHP.INI location", but despite multiple attempts to configure the applicationHost.config file, I cannot get the three sites to each run off their own file.
Info:
site 1: beta.xxxxx.com, local path to php file: c:\websites\beta.xxxxx.com\php.ini, locap path to web site files c:\websites\beta.xxxxx.com\www\
site 2: www.yyyyy.com , local path to php file: c:\websites\www.yyyyy.com\php.ini, locap path to web site files c:\websites\www.yyyyy.com\www\
site 3: www.xxxxx.com , local path to php file: c:\websites\www.xxxxx.com\php.ini, locap path to web site files c:\websites\www.xxxxx.com\www\
So far, the only thing I can get to work is to have all three sites read one PHP.ini file from inside one of the directories (this WORKS, but globally changes all three sites to read from the one PHP.ini file). I need separate configs, one for each file.
<fastCgi>
<application fullPath="C:\PHP\php-cgi.exe" arguments="" maxInstances="4" idleTimeout="300" activityTimeout="30" requestTimeout="7000" instanceMaxRequests="10000" protocol="NamedPipe" queueLength="1000" flushNamedPipe="false" rapidFailsPerMinute="10">
<environmentVariables>
<environmentVariable name="PHPRC" value="C:\Websites\beta.xxxxx.com\php.ini" />
</environmentVariables>
</application>
</fastCgi>
I cannot seem to get the "site 2" and "site 3" setups to work and read their own php.ini file. If I add more entries into the <fastcgi> area for the other sites, that that typically get IIS generates errors that it can't find the right handler.
Am going nuts here as I need to have separate configs in the php.ini files, and short of moving the sites to separate boxes am getting more grey hair by the second.