I am uploading small images to a local IIS server running PHP. The images are sent by a POST HTTP request. Whenever the post size exceeds 16kB I get a 500 response from the server saying:C:\PhP\php-cgi.exe - The FastCGI process exited unexpectedly.
The problem persists even if I reduce the PHP script to:
<?php
?>
Also the problem did not occur when I ran the script on mongoose. php_errors.log does not mention the problematic script. I checked my php.ini file for post_max_size and memory_limit and what have you and found nothing to justify a PhP crash on 16kB of data.
I'm pretty new to IIS but I suspect the problem is there. I checked system.webServer/security/requestFiltering and found these values:
- maxAllowedContentLength: 30000000
- maxQueryString: 2048
- maxURL: 4096
I have no idea what could be causing the problem or where to look next. Any help would be appreciated.
EDIT: I found out that http.sys limits request content to 16 kB by default and changed that by adding a MaxRequestBytes field with 16MB value to registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters. I was sure that was going to solve it, but it didn't.