PHP 5.2.x ISAPI stability on Windows IIS 6.0
Having dealt with multiple IIS servers with all kinds of PHP configurations, I’ll let you in on a little secret. PHP 4.4.4 or 4.4.x ISAPI is by far the most stable in any situation. PHP 5.2.x has terrible memory management. If you have a piece of bad code that eats up memory, PHP will not put a stop to it like it should. Here’s an error I received:
And of course no matter how much memory I allocate, it eats it all up. It’s just a matter of time. Then comes this error:
The obvious solution is to write better code that doesn’t leak memory. However, this isn’t always possible, especially if you are hosting websites run by other people. Many shared hosting accounts on IIS 6.0 experience total PHP shutdown due to one site’s bad code. I have thoroughly tested every 5.2.x line of PHP and they all suffer from this problem. If you want to or need to use PHP 5.2.x, use CGI or Fast-CGI (there’s a beta from IIS.net) as you will not experience any of these memory issues. However Fast-CGI still isn’t as quick as ISAPI, and in terms of the IIS.net beta, suffers from max uploads of ~1 MB.
Summary for maximum stability/speed combo:
PHP 4.4.x -> use ISAPI
PHP 5.2.x -> CGI (in PHP package) or Fast-CGI (from IIS.net)
Don’t use any other line of PHP since they are no longer supported and have multiple security issues.

Comments
[...] post about php performance on W2K3 and IIS6; summary is that, if using, php 5.2.x, you should always use [...]