Second Technical Preview of FastCGI

      Comments Off on Second Technical Preview of FastCGI

I received several emails from friends at Microsoft yesterday letting me know that they have released the second technical preview of FastCGI.

For those of you not familiar with FastCGI, here’s a quick blurb from the FastCGI homepage.

FastCGI provides a high-performance alternative to the Common Gateway Interface (CGI), a standard way of interfacing external applications with Web servers that has been supported as part of the IIS feature-set since the very first release.

Mike Volodarsky sent me this little blurb talking about this newly released “second technical preview”.

The IIS team has just released the second technical preview of the FastCGI component, which provides a reliable and highly-performant option for hosting PHP applications on Windows / IIS. The preview addresses a number of compatibility issues reported by the PHP community for the first release that took place a few months ago. You can read more about it, and try it out at the IIS FastCGI site”.

Mike also sent me a link to a blog post about FastCGI. Among other things, this the post contains a list of bug-fixes and features added to FastCGI in this second technical preview.

Technical Preview 2 contains the following bug fixes and enhancements:
1. Native support for 64 bit Windows operating systems. The 64-bit packages provide full installation support for 64-bit OS, and enable both native 64-bit and 32-bit WOW64-based IIS applications. The FastCGI application, such as PHP, can be either 32 bit or 64 bit.
2. Additional server variables used by PHP and other FastCGI frameworks. These include DOCUMENT_ROOT, REQUEST_URI, and SCRIPT_FILENAME.
3. Support for PHP’s fcgi.impersonate. This enables PHP applications on Windows to impersonate the authenticated user making the request, enabling the PHP scripts to execute as that user instead of the identity of the IIS worker process.
4. Improved error handling. Added a number of error messages for common error conditions such as misconfiguration. This is primarily done in the IIS7 package version. Also, provided proper handling for FastCGI application errors, such as PHP script errors.
5. Improved FastCGI application process management. The FastCGI component is now resilient to shutting down or killing the IIS worker process, or stopping the IIS service, making sure to terminate the child FastCGI application processes. This means that you should no longer see orphaned php-cgi.exe processes when you do any of the things above.
6. Improved timeouts. Several changes to make the timeouts more flexible / correct, including the added the activityTimeout setting, which insures that the child FastCGI process remains responsive. Also added the idleTimeout setting, which controls how long the process can be idle before its terminated.
7. Enabled the TCP transport mechanism. This provides support for TCP-based FastCGI application implementations.
8. Removed the response entity-body, and request POST entity-body size limitations. Previously, internal constraints limited this to 1 Mb each.
9. Support for passing command line arguments to FastCGI application processes. Allows FastCGI applications that require command line arguments to be specified to be used with the FastCGI feature.
10. Experimental Ruby support.

There are some additional resources that you may be interested in as well. There are FastCGI forums setup for IIS5/6 and IIS7. Additionally, there is an article titled Installing PHP with the FastCGI technical preview online to help you get started.

So if you are developing or deploying on Windows, fire up those browsers and head on over there for the download. The are asking for your help in testing FastCGI and would appreciate any feedback you may have.


About Cal Evans

Many moons ago, at the tender age of 14, Cal touched his first computer. (We're using the term "computer" loosely here, it was a TRS-80 Model 1) Since then his life has never been the same. He graduated from TRS-80s to Commodores and eventually to IBM PCs.   For the past 10 years, Cal has worked with PHP and MySQL on Linux OSX, and when necessary, Windows. He has built on a variety of projects ranging in size from simple web pages to multi-million dollar web applications. When not banging his head on his monitor, attempting a blood sacrifice to get a particular piece of code working, he enjoys building and managing development teams using his widely imitated but never patented management style of "management by wandering around". Cal is happily married to wife 1.33, the lovely and talented Kathy. Together they have 2 kids who were both bright enough not to pursue a career in IT. Cal blogs at and is the founder and host of Nomad PHP