PHP on IIS7 and Windows Server 2008 – Pros and cons

iis-6iis-7netPHP

Background:
I work for a small microsoft based web dev company who is slowly starting to do more PHP based work. To date we've run these sites (mostly WP) through IIS6 on Windows Server 2003 although this presents problems around mod rewrites etc.

We're at a stage where we can make a decision between upgrading our existing server to IIS7 on Windows Server 2008 which seems to have better support for running PHP and all it entails – OR – getting a Linux box.

As a developer my preference is for the Linux server although the finance department ain't too keen on paying for another server.

Question:
Have you experienced any significant problems in hosting PHP on IIS7 on WS 2008 alongside .NET apps? Are there any concrete technical reasons why we shouldn't use this set up?

Appreciated,
Alex

Best Answer

PHP on IIS is improving all the time. I work for a web hoster I can confidently say that you won't see any major issues continuing to run PHP on IIS.

Additionally, PHP and ASP.NET applications never really see each other or get a chance to do battle. This is because PHP scripts are run in a separate process (c:\php\php-cgi.exe) spawned by IIS. ASP.NET code executes inside a worker process which is totally separate.

You should also ensure that on IIS7 that you take advantage of the FastCGI support, this gives PHP applications a significant bump in performance (as it does in IIS6 as well).

PHP applications on IIS can also indirectly take advantage of the managed pipeline features offered by IIS7. The following article may be of interest:

Enhance Your Apps with the Integrated ASP.NET Pipeline (MSDN Magazine)

Unless there's some PHP code that's really specific to Linux, which is pretty rare, I don't see a need to move to Linux.