How to install PHP in IIS 7.5, Windows Server 2008 R2 (64bits) How to install PHP in IIS 7.5, Windows Server 2008 R2 (64bits) php php

How to install PHP in IIS 7.5, Windows Server 2008 R2 (64bits)


(My experiences running PHP under IIS)

I believe that you should set up PHP as a FastCGI module - I don't think you are able to set up PHP as an ISAPI extension. You can set up PHP either using FastCGI or ISAPI - It may be that ISAPI is faster than FastCGI. There is a guide on setting up IIS using ISAPI here:

Searching google reveals a lot of pages discussing the thread safe vs non thread safe argument if you want to know the detail, however the short version is that the non thread safe version is faster, but the thread safe version is safer. You should choose the thread safe version for now unless you have a performance problem and know that your app is going to run correctly under the non thread safe binaries.

Finally, there isn't really any need for x64 binaries when running PHP as a FastCGI application - php runs as a separate process and so the x86 binaries will run fine on a x64 web server, and most normal php applications will have no need for an address space above 4GB as to scale IIS can simply start additional php processes.

When configuring your FastCGI extension you need to point it at the php-cgi.exe executable in the php installation directory.


I often use FastCGI when setting up PHP on IIS. It is moreso habit than anything else. While I did read over many of the other articles posted and it does appear that ISAPI has many advantages I thought I'd add a link to setting up FastCGI for those who want to go that route. I've used it and never had any issues with moderate request traffic.

Anyway here's a link to an article with screenshots on setting up PHP via FastCGI on IIS 7.5.

Click here to visit the article.