I am using FastCGI to run PHP7 on an IIS10 webserver for two sites:
- Default Web Site binded to port 80 and port 443
- Development (port 5588)
both of which have responseBufferLimit set to 0. The first site also has ssl enabled. Outputting long php scripts before they end, works on site 2 http and site 1 https, but not site 1 http.
For testing purposes I am using:
<?php
set_time_limit(0);
function flush_buffers()
{
ob_end_flush();
ob_flush();
flush();
ob_start();
}
ob_start();
flush_buffers();
echo "starting...<br/>\n";
for($i = 0; $i < 2; $i++)
{
flush_buffers();
print "$i<br/>\n";
flush_buffers();
sleep(1);
}
flush_buffers();
print "DONE!<br/>\n";
?>
Also, if I create another site, with the same PHP sources, on another port, it also works. But if I try to use the same 80 port on the new site over http, it stops working.
- I tried setting responseBufferLimit over in
C:\inetpub\wwwroot\web.configand inC:\Windows\System32\inetsrv\config\applicationHost.config.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
...
<handlers>
<remove name="FastCGI" />
<add name="FastCGI" path="*.php" verb="*" type="" modules="FastCgiModule" scriptProcessor="E:\PHP7\php-cgi.exe" resourceType="File" requireAccess="Script" allowPathInfo="false" preCondition="" responseBufferLimit="0" />
</handlers>
...
</system.webServer>
</configuration>
iisresetafter every modification- removed my FastCGI module then placed it back
- did everything through the IIS Manager GUI too
- tried adding with CLI too. FastCGI is my handler name ofc.
appcmd.exe set config "Default Web Site" -section:system.webServer/handlers /[name='FastCGI'].responseBufferLimit:"0"
- tried setting it to
1instead of0 - put it back to
0 iisresetafter each mod ofc- I even removed the ssl bind from 1st site. Same behavior
- Tried setting dynamic compression to false too
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<urlCompression doDynamicCompression="false" />
</system.webServer>
</configuration>
I am purely lost