Are you a member? sign in or take a minute to sign up

User Id: Password:

PHP on IIS 7.5

Php has become again part of my programming life when SCS starts integrating with this powerful scripting language. Installation and configuration of this scripting language is straight forward, especially if you are using it in the context of LAMP stack or even in Windows and Apache. And now, Microsoft had supported this language and had it available for windows web developer with ease of installation and configuration via the use of Web Matrix. It is a nice tool that would install applications with just few clicks of your mouse.

I had a working Php environment on my IIS 7, which I had, configured manually using FastCGI module and it did work like a chimp. I guess I am the kind of developer that normally would like to see where the installed files go and what are the options I can make out of it. On the other I also had Web Matrix installed in my box which I had use to setup a component of Sql Server to support PHP. And I haven’t had an issue with it.

On top of all these software installed on my IIS was the Phalanger which now SCS uses for making “Php a first class .net citizen.” And I remember that these setup had occurs before I actually receive the notice from Microsoft that Windows 7 SP1 is now available for my Toshiba box. And it’s worth mentioning that Phalanger install would put an entry on your machine.config file for this PhpNet section. But there is also a way to manually configure Phalanger but that is out of the log.
I didn’t notice any weird issue on Php and on my IIS together until I was again assigned to work on a Php web application which needs to use the latest Php 5.3 and not Phalanger for handler the request.

On a usual way I created a web app on IIS 7.5 manually, creating a handler for .php on that particular site using FastCGI Module and pointing it to php-cgi.exe. And I thought I had it all figured out together but something was wrong. IIS could not run the app and is reporting an invalid configuration. It can’t even read the web config for an entry of Default document.
So I had to fire up Web Matrix and try to install Php FastCGI but it would just report that, it is not supported in my system. I also noticed that the Web Matrix had installed bunch of other software including IIS Express for the Web Matrix. But after all those install Php still is not working, and no Php manager showing on IIS even after installing it. I did try IIS reset and a full pc reboot but of no use.

What had worked out for me was to setup Php handler on the root of IIS web applications. I did the same configuration of creating a FastCGI module but instead of making it specific to the web site I had now to configure it on a global setting.
I know that Php FastCGI could would on a specific web site and not only via global setting. I believe that for Php FastCGI not working on my box is an isolated case which I would really like to understand why it is so. If time permits I would do the same setup on a clean box and hope to prove what I know works and clear out this issue I had with IIS.