skip to Main Content

Note: I know this looks like a duplicate of this question. I don’t see how it is a duplicate. I already stated that I have checked that question, and I tried all the answers, but it didn’t work.

Here is what I tried:

  1. Under Dario’s answer, I followed the steps but didn’t find any php under name section

  2. On the accepted answer I run the same code on command line prompt but it shows:

    appcmd.exe set config /section:handlers "/[name='PHP55_via_FastCGI'].ResponseBufferLimit:0"
    

    and that returns this:

    ERROR ( message:Cannot find requested collection element. )

  3. Then I checked the PHP manual:

    flush manual

    i didn’t find anything in that config file like _via_FastCGI

  4. I checked Plesk’s PHP setting and yes my server is running on FastCGI mode.

So, I have worked so many hours on my development server for that flush part and now on my live server it is not working. Any help will be highly appreciated

Update 1:

as suggested by @artlung, i have attached the screenshot here:

FAST CGI HANDLERS

Update 2:

Here is what i found in notepad++ by searching with keyword “FastCGI”

<add name="FastCgiModule" lockItem="true" />
<add name="PleskEngine-FastCGI-html" path="*.html" verb="*" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)ParallelsPleskadminbinphp-cgi.exe|-dauto_prepend_file=auth.php" resourceType="Either" responseBufferLimit="0" />
<add name="PleskEngine-FastCGI-html" path="*.html" verb="*" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)ParallelsPleskadminbinphp-cgi.exe|-dauto_prepend_file=auth.php" resourceType="Either" responseBufferLimit="0" />
<add name="PleskEngine-FastCGI-php3" path="*.php3" verb="*" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)ParallelsPleskadminbinphp-cgi.exe|-dauto_prepend_file=auth.php" resourceType="Either" responseBufferLimit="0" />
<add name="PleskEngine-FastCGI-php3" path="*.php3" verb="*" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)ParallelsPleskadminbinphp-cgi.exe|-dauto_prepend_file=auth.php" resourceType="Either" responseBufferLimit="0" />
<add name="PleskEngine-FastCGI-php" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)ParallelsPleskadminbinphp-cgi.exe|-dauto_prepend_file=auth.php" resourceType="Either" responseBufferLimit="0" />
<add name="PleskEngine-FastCGI-php" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)ParallelsPleskadminbinphp-cgi.exe|-dauto_prepend_file=auth.php" resourceType="Either" responseBufferLimit="0" />
<add name="PHP-phtml" path="*.phtml" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)ParallelsPleskAdditionalPleskPHP55php-cgi.exe" resourceType="Either" />
<add name="PHP-php3" path="*.php3" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)ParallelsPleskAdditionalPleskPHP55php-cgi.exe" resourceType="Either" />
<add name="PHP-php" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)ParallelsPleskAdditionalPleskPHP55php-cgi.exe" resourceType="Either" />
<add name="PHP-phtml" path="*.phtml" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)ParallelsPleskAdditionalPleskPHP55php-cgi.exe" resourceType="Either" />
<add name="PHP-php3" path="*.php3" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)ParallelsPleskAdditionalPleskPHP55php-cgi.exe" resourceType="Either" />
<add name="PHP-php" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)ParallelsPleskAdditionalPleskPHP55php-cgi.exe" resourceType="Either" />
<add name="PHP-phtml" path="*.phtml" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)ParallelsPleskAdditionalPleskPHP55php-cgi.exe" resourceType="Either" />
<add name="PHP-php3" path="*.php3" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)ParallelsPleskAdditionalPleskPHP55php-cgi.exe" resourceType="Either" />
<add name="PHP-php" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)ParallelsPleskAdditionalPleskPHP55php-cgi.exe" resourceType="Either" />

3

Answers


  1. Look for a fcgiext.ini and uncomment/add the line ResponseBufferLimit=0 to it, then restart IIS.

    Login or Signup to reply.
  2. appcmd.exe set config /section:handlers "/[name='NAME'].ResponseBufferLimit:0"

    Change NAME to the name of handler you want to update e.g. PHP7_via_FastCGI.

    Check the paths, It should solve your issue, I had the same issue and this method helped me.

    Login or Signup to reply.
  3. There are many features and their settings that may conflict with each other in IIS.

    It seems like you could not be able to set responseBufferLimit for your handler.

    You need to know what’s your handler’s name first.

    Open a command prompt and run:

    %windir%system32inetsrvappcmd.exe list config -section:system.webServer/handlers | find "FastCGI"
    

    It’s possible to have more than one handler listed like below and that’s ok. Yours is the top one, in here it’s PHP53_via_FastCGI.

    <add name="PHP53_via_FastCGI" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)PHPv5.3php-cgi.exe" resourceType="Either" />
    <add name="PHP54_via_FastCGI" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)PHPv5.4php-cgi.exe" resourceType="Either" /
    <add name="PHP55_via_FastCGI" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)PHPv5.5php-cgi.exe" resourceType="Either" />
    <add name="PHP56_via_FastCGI" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)PHPv5.6php-cgi.exe" resourceType="Either" />
    <add name="PHP70_via_FastCGI" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:Program Files (x86)PHPv7.0php-cgi.exe" resourceType="Either" />
    

    By replacing PHP53_via_FastCGI with yours, run the following command to change the responseBufferLimit:

    %windir%system32inetsrvappcmd.exe set config -section:system.webServer/handlers /[name='PHP53_via_FastCGI'].responseBufferLimit:"0" /commit:apphost
    

    restart the IIS by running:

    iisreset
    

    Try the load php page again.

    If still not works as expected, you can be sure that it’s because of IIS’s Dynamic Compression. Since it handles all dynamic responses with content type text/* by default, when it’s enabled it could block a PHP response to compress.

    You can temporarily disable dynamic compression to see if it works.
    Take a back up your web site’s web.config and put the following instead, and try to load your PHP page.

    web.config

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <urlCompression doDynamicCompression="false" />
        </system.webServer>
    </configuration>
    

    In case you don’t want to disable dynamic compression for all the web site, there are other levels you can disable dynamic compression for virtual applications, physical and virtual directories or a specific file.

    For more information have a look at HTTP Compression Feature Requirements

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search