Important update for IIS 7.0 FastCGI module

FastCGI module in IIS 7.0 has been lacking some of the features and bug fixes that are available in IIS 7.5 FastCGI module and in FastCGI Extension 1.5 on IIS 5.1 and IIS 6.0. The reason why this happened are explained in the post about FastCGI Module: Differences across IIS versions. This week IIS team has released an update for FastCGI module in IIS 7.0 that closes this remaining feature gap and ensures that FastCGI functionality is consistent across all versions of IIS.

The update can be downloaded from the following locations:

The features that are enabled by this update:

  • Monitor changes to a file. The module can be configured to listen for file change notifications on a specific file and when that file changes, the module will recycle FastCGI processes for the process pool. This feature can be used to recycle PHP processes when changes to php.ini file occur. To enable this feature use the monitorChangesTo setting in the <fastCgi> configuration element.
  • Real-time tuning of MaxInstances setting. This MaxInstances setting dictates the maximum number of FastCGI processes which can be launched for each application pool. Set it to 0 to let FastCGI module automatically adjust the number of instances up or down based on the system load and number of requests waiting in the queue.
  • STDERR stream handling. There are several options of how the module can handle text sent by FastCGI application on STDERR. The module can send the error data as a failure response to the HTTP client or it can ignore the error and send whatever was received on STDOUT as a response with 200 status code. This behavior is controlled by the stderrMode setting.
  • Sending a termination signal to FastCGI processes. The module can be configured to send a termination signal to FastCGI process before terminating it. This enables FastCGI processes to do a clean shutdown before getting killed. The signalBeforeTerminateSeconds setting can be used to specify how long the module will wait before it forcefully shuts down the FastCGI process that does not respond to the termination signal. This feature is disabled by default.
  • _FCGI_X_PIPE_ environment variable. This variable is set by FastCGI module and it contains the name of the named pipe that is used for communication between the module and FastCGI process.
  • Relaxed enforcement of response headers syntax. The FastCGI module now has less strict enforcements for the correctness of the response headers.
  • Using UTF-8 encoding for server variable values. By default FastCGI uses ASCII encoding when setting server variables. If a FastCGI application requires UTF-8 encoded values for certain server variables, the module can be configured to use UTF-8 only for required server variables. Follow these instructions to enable this functionality.

Note: To get UTF-8 encoding support in IIS 7.5 in Windows 7 and Windows Server 2008 R2 download the KB 2277918 hotfix.

In addition to that several important bugs have been fixed, most notable of those are the ones reported by Franklin Tse:

If you are using IIS 7.0 to host PHP applications, then it is highly recommended to apply this update to ensure you have the latest version of FastCGI module.

24,864 views

ruslany on March 10th 2010 in FastCGI

PoorFairAverageGoodExcellent (3 votes, average: 4.33 out of 5)

27 Responses to “Important update for IIS 7.0 FastCGI module”

  1. Gravatar ImageDmitry responded on 10 Mar 2010 at 11:43 pm #

    It’s just wonderful. I have so long been waiting for this bugfix.

  2. Gravatar ImageBart McLeod responded on 11 Mar 2010 at 1:05 am #

    What about windows 7 64 bit, any patches for that?

  3. Gravatar Imageruslany responded on 11 Mar 2010 at 9:44 am #

    There are no patches for Windows 7 or Windows Server 2008 R2, because FastCGI module in Windows 7 already has all the new features. The patch is only necessary for Windows Vista and Windows Server 2008.

  4. Gravatar ImageFranklin Tse responded on 11 Mar 2010 at 10:01 am #

    Hi Ruslan,

    Will the “Custom application errors were masked by the generic IIS errors” bug be fixed in IIS 7.5 as well?

    Thanks~

  5. Gravatar Imageruslany responded on 11 Mar 2010 at 7:11 pm #

    @Franklin: Yes, it will be fixed in IIS 7.5 with Windows 7 SP1.

  6. Gravatar ImageJoe responded on 31 Mar 2010 at 10:37 am #

    After installing the update, I don’t see the monitor changes option in the interface. I do see the named pipe environment variable in the environment. The server was rebooted. Is the something specific to look at?

  7. Gravatar Imageruslany responded on 31 Mar 2010 at 11:17 am #

    Joe, the FastCGI settings UI in IIS 7.0 will not show the new settings because the UI was shipped before the update was done and there are no plans to update the UI for IIS 7.0. You can still set the new configuration settings by editing the applicationHost.config file or by using appcmd command as described here: http://ruslany.net/2010/03/php-on-iis-monitorchangesto-setting-in-fastcgi/, or by using IIS Configuration Editor.

    In IIS 7.5 you can use UI to edit new configuration settings.

  8. Gravatar ImageGoodness of dynamic maxInstances in FastCGI « Kanwaljeet Singla responded on 03 May 2010 at 2:11 pm #

    [...] we have added this feature to FastCGI ISAPI 1.5 and made it available on IIS 7.0 as well (read more here). Last week I spent some time comparing dynamic maxInstances results with suggested maxInstances [...]

  9. Gravatar ImageSteffan responded on 16 May 2010 at 4:46 am #

    I wonder about update on IIS7.5. UTF-8 server variables feature is missing and it’s a huge drawback.

    Can anyone help us use this feature on Windows 2008 R2 + IIS7.5 or maybe give us an estimate of a fix?

    Thank you.

  10. Gravatar Imageruslany responded on 04 Jun 2010 at 4:31 pm #

    @Steffan: The UTF-8 feature will be available in the Windows 7 SP1. Also IIS team is considering a possibility of providing an update for Windows 7 to make the feature available sooner that SP1.

  11. Gravatar ImageJohny responded on 27 Jul 2010 at 5:53 pm #

    When I try to use the new WPI, it hangs installing this fix. I´m using 2008 32 bits.

    Have you seen this behaviour ? How can I fix it ?

  12. Gravatar Imageruslany responded on 30 Jul 2010 at 10:19 am #

    Hi Johny,

    I have not seen this behavior. Are you talking about Web PI 3.0 beta? Also, have you tried to install this update separately, without using Web PI?

  13. Gravatar ImageThobaa responded on 31 Jul 2010 at 12:49 pm #

    Hey Ruslany u so fast and helpful.
    well i got struck on installing joomla on localhost iis7 on windows 7. Everything installed correctly i mean joomla, mysql, and php. Joomla installs from web platform installer without error but when i try to run it in browser it says Error establishing a database connection
    ??please help

  14. Gravatar Imagealmir responded on 06 Aug 2010 at 3:59 am #

    Hi,

    My Web Platform Installer installation of WordPress blogging tool hangs on the step when the Update for IIS 7.0 FastCGI (KB980363) is being installed. I am installing it on Windows Server 2008 standard 32 bit.

    I am able to install KB980363 manually but then all my websites return 503 error.

    Any suggestions on how to get around this issue?

    thank you.

  15. Gravatar ImageJohny responded on 07 Aug 2010 at 12:51 pm #

    There is something definitely wrong with KB980363. I think I managed to fix, but it required to stop IIS Admin manually and rerun the installation process. Then it worked.

    I hope it helps. Ruslany, can you check this behaviour and provide a fix ?

  16. Gravatar Imagealmir responded on 13 Aug 2010 at 3:25 am #

    Johny,

    I followed your example, stopped IIS admin service, FTP as well as the SMTP services which let me install wordpress together with KB980363 update but then I had the same 503 error on all my websites :(

  17. Gravatar Imagealmir responded on 13 Aug 2010 at 4:58 am #

    found the workaround….
    1) stopped iisadmin
    2) installed WordPress together with KB980363 (this step crashed IIS, as usual, giving 503 error)
    3) uninstalled KB980363. (fixed the 503 error)
    4) completed WordPress installation. All websites up and running.

    Now, the question is – how is the IIS 7 going to work with PHP without the updated FastCGI module???

    All websites up and running including wordpress… no issues.

  18. Gravatar Imageruslany responded on 13 Aug 2010 at 3:59 pm #

    Hi Almir, thanks for reporting this. We were not able to repro this before, but we will try again with SP1 of Windows Server 2008. May be that is causing the problems.

    You can run PHP and WordPress on IIS 7 without the updated FastCGI module. It is still fully functional even without the update.

  19. Gravatar Imagematt responded on 24 Aug 2010 at 5:24 am #

    ruslany,

    I’ve ran into an issue while comparing 2 separate fastCGI installs.
    TestBox1:(installed yesterday)
    TestBox2:(installed in Janurary)

    This issue is focused around the following sectionSchema = system.webServer/fastCgi

    TestBox1:fastCgi attribute settings for idleTimeout, activityTimeout, and requestTimeout are all set at 10,2592000

    TestBox2:fastCgi attribute sdttings for idleTimeout = 10,604800
    activityTimeout = 10,3600
    requestTimeout = 10,604800

    I need an activityTimeout of longer than 3600sec. Does this update address my issue? I’ve found little clarification relating to this other than taking ownership of the iis_schema.xml and editing manually. Rather than going this route I’d like to understand how my newer install, TestBox1, has larger maximum settings. Which component, update, module, etc has been updated to cause this change.

  20. Gravatar Imageruslany responded on 27 Aug 2010 at 1:38 pm #

    Hi Matt,

    I am not sure I understand. Are you setting the timeouts to the maximums in order to disable timeouts? If so then the maximum allowed values for those settings should not be affected by the update. Do you see the different maximum values in the IIS_Schema.xml on TestBox1 and TestBox2?

  21. Gravatar ImageAlex responded on 01 Oct 2010 at 8:17 am #

    ruslany,

    is it necessary to install http://support.microsoft.com/kb/2277918/ to get utf8 url working on Windows 7/Windows 2008R2?

  22. Gravatar Imageruslany responded on 01 Oct 2010 at 9:36 am #

    Hi Alex,

    Yes, you are right, this is the hotfix to get the utf8 url’s working on IIS 7.5 in Windows 7 and Windows Server 2008 R2.

  23. Gravatar ImageAlex responded on 04 Oct 2010 at 6:36 am #

    ruslany,

    thanks for a confirmation. I think, it would be useful, if you include a KB link in the article above. Because this page is a first one in search results for FastCGIUtf8ServerVariables (at least in g..gl) and it would be nice, if readers will see immediately, that they have to patch a server to get FastCGI UTF8 working…

  24. Gravatar Imageruslany responded on 05 Oct 2010 at 11:35 pm #

    Hi Alex, this is a good suggestion. I have updated the blog post.

  25. Gravatar Imagemart responded on 30 Nov 2010 at 1:42 pm #

    This hotfix doesn’t fix urf8 prob here on IIS7.5 and WS2008R2 64bit. Do You know why?

  26. Gravatar Imageanurag saxena responded on 14 Jul 2011 at 5:12 am #

    I need the same for windows 7. can you please help me.

  27. Gravatar Imagedt-GR responded on 21 Oct 2011 at 10:44 am #

    How can one enable UTF-8 encoding server variables for IIS Express (Vista x64)?

    I am attempting to setup a dev site locally for WordPress using WebMatrix identical to my live server configuration and code.

    My site requires UTF-8 encoding for server variable values for the WordPress category links.

    The “reg add …” command successfully enables this functionality on the live server, but this command gives an error on the development server.

    Thank you!

Trackback URI | Comments RSS

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

XML Markup: If You want to add XML code to the comment please XML encode it first, otherwise the code will not show up.

Recently Published Articles