Link to home
Start Free TrialLog in
Avatar of RetroRocker

asked on

Running multiple PHP versions in IIS 7.5

I'm running IIS 7.5 on Win 7 x64 for localhost development and attempting to run multiple versions of PHP in IIS so that each site can have its own version with its own process pool. I think this should be perfectly possible but it's proving very difficult to achieve.

Firstly I have predominantly used the following 2 sources for information ...

... these are helpful but apparently contain wrong information eg. IIS7.5 config will have nothing to do with the <environmentVariables> tag, it throws a 500 error.

Basically I am trying to run PHP 5.2.17 , 5.3.18 and 5.4.8
I can get 5.2.17 to successfully run but the other 2 give the 'Input file not specified' error.
I have read many articles about the requirement for a 'doc_root' and / or 'open_basedir' directive within the appropriate php.ini file. I have tried all conceivable permutations of these but nothing helps. Do note though that an open_basedir directive is used for each fastCGI entry in the attached applicationHost.config file via the appropriate cgi-exe file -d switch.
If I simply rearrange the order of the PHP entries in the config file eg. make 5.3.18 first, then that version is now available to me ... but for all 3 websites ! So it seems that all 3 versions of PHP are successfully installed, with their corresponding local website available, but they don't match up with the appropriate PHP version.
From the attached config file and the info above could anybody shed any light on what might be going wrong with this IIS configuration please ?

thanks RR
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RetroRocker


DaveBaldwin: Thanks for the advice about it not being a good idea to put PHP versions into a subdirectory of another. It wasn't really the problem but sound advice no doubt and it has been rectified.
What you did do though was point me in the right direction. The fundamental issue was in the scope of the handler mappings ... I had them set at SERVER level, not SITE level !!!
The article you linked to (which is the same as one of the links I posted) does provide fully correct information, I didn't read it properly :(  All is now working exactly as it should.
I'm grateful for your time and effort. RR.
Glad you got it working.