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:
-
Under Dario’s answer, I followed the steps but didn’t find any php under name section
-
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. )
-
Then I checked the PHP manual:
i didn’t find anything in that config file like _via_FastCGI
-
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:
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
Look for a
fcgiext.ini
and uncomment/add the lineResponseBufferLimit=0
to it, then restart IIS.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.
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:
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
.By replacing
PHP53_via_FastCGI
with yours, run the following command to change theresponseBufferLimit
:restart the IIS by running:
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
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