Partner and Community Forums
IIS7 + two PHP versions (with *two* different PHP.INI files)
Last post May 27, 2014 09:02 AM by Jan Reilink
May 26, 2014 12:40 PM|ilnebbioso|LINK
I've got a question for all of you which is making me crazy.
I was able to have *two* different PHP versions (5.5.10 and 5.4.28) for two websites into the same Windows Server. But, both of them use the same PHP.INI file and I'm not able to understand why.
In fact, if I look into the two phpinfo.php I see:
As you can see I have these two rows which are wrong, IMHO:
Into WEBSITE B I expect: "Loaded Configuration File C:\PHP5.4.28\php.ini".
In both WEBSITE A & B I expect In Environment the "PHPRC" value empty or different in WEBSITE B.
We have a:
I verified the PHPRC in System->Advanced Settings->Environment Variables->System variables, which was REMOVED. Also verified by CMD > SET that there isn't any PHPRC parameter.
After that, I also added into regedit the expected values as explained here: http://www.php.net/manual/en/configuration.file.php
I also rebooted the server.
I expect that the two websites use the [HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y.z]
But these values aren't what I receive back.
What's wrong? I'm ready to give all the needed details.
Thank you very much for your help and support since now!
May 27, 2014 09:02 AM|Jan Reilink|LINK
You may only use one php.ini per applicationpool. Perhaps my answer on Servervault might give you some insights:
http://serverfault.com/questions/593490/secure-php-on-iis-8-5/598164#598164 (the question was "Secure PHP on IIS 8.5"). We use this to run 3 different PHP versions, with a total of 7 php.ini files, all useable for hosted websites.