« Previous Next »

Thread: IIS7 PHP FastCGI and gzip compression

Last post 07-10-2009 5:00 PM by anilr. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 07-10-2009, 6:07 AM

    IIS7 PHP FastCGI and gzip compression

    For some reason, I can't seem to get gzip compression (static or dynamic) to work with PHP and FastCGI running under IIS7 (Windows Server 2008).

    I know the gzip works because I've tested it with an ASP.NET application.

    Has anyone else encountered this problem?  

  • 07-10-2009, 9:44 AM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,247

    Re: IIS7 PHP FastCGI and gzip compression

    static compression will not work since it is not a static resource, but dynamic compression should work - can you collect a failed request trace log of a request with dynamic compression not working and provide the reason phrase in the DYNAMIC_COMPRESSION_NOT_SUCCESS event.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
  • 07-10-2009, 1:40 PM In reply to

    Re: IIS7 PHP FastCGI and gzip compression

    I've run multiple tests with different settings with the following reason phrases for the DYNAMIC_COMPRESSION_NOT_SUCCESS event:

    Reason 1
    Reason NO_ACCEPT_ENCODING

    Reason 4
    Reason NO_COMPRESSION_PROXY

  • 07-10-2009, 5:00 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,247

    Re: IIS7 PHP FastCGI and gzip compression

    The first one indicates that the request had no Accept-Encoding header and the second one indicates that the request came via a forward proxy (had a via header) - you should be able to verify that is the case by looking at the content of the GENERAL_REQUEST_HEADERS event earlier in the trace log - for the second one, you can change the behavior by setting noCompressionForProxies to false in the httpCompression section (%windir%\system32\inetsrv\appcmd set config -section:system.webServer/httpCompression -noCompressionForProxies:false)

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
Page 1 of 1 (4 items)