I’m running a fairly standard WIMP setup at work: Win 2003, IIS, PHP4, MySQL (note, this website is LAMP). One of my users just got the dreaded CGI error:
The specified CGI application misbehaved by not returning a complete set of HTTP headers.
She is getting this error every time she tries to upload a 13MB zip file using a HTML form on the website. Worst thing is, I cannot for the life of me replicate this error. I was able to upload the same file from the local network in a matter of seconds. It looks like a persistent, but intermittent problem that only shows up in specific circumstances.
I googled for this error message, but I’m not finding anything that would help me with my problem. In fact, this message seems to indicate a wide variety of possible issues, which might be very hard to diagnose.
For example, you may need to modify the generated headers, but I don’t think this is a problem here. The upload form seems to be working for most of the other users just fine. If the headers were wrong, I would get this error all the time, no?
Some people say this is a known IIS bug that crops out on multiprocessor machines. My server has a single CPU however, so I don’t think this solution is for me either.
There is a huge thread in PHP bug report system with all kinds of solutions, none of which was confirmed to work. I think the thread got eventually closed when someone pointed to the multiprocessor solution I linked above. It does provide some interesting suggestions. For example, I like this one:
[5 Oct 2004 12:13am UTC] true_weakness at hotmail dot com
Hi All i have a windows 2003 sErver running IIS 6, I had the same problem with the cgi timeout, resolved by downloading the IIS 6 resource kit. With the IIS Metabase Explorer, go to the Server name, Expand LM, go to W3SVC. Find event CGI Timeout and change the default from 300 secs to whatever you need and it works
Following advice of someone whose email is true_weakness at hotmail.com may not be a good idea, but it does sound like a reasonable solution. Since my user was uploading a relatively big file, over a relatively slow DSL connection it is possible that we were dealing with some CGI timeout scenario. I adjusted the timeout value as described here. Unfortunately there is no way for me to test this again, because the user has emailed the file to the office and went off to do bigger and better things. :|
Oh well, I guess I’ll find out if it worked next time she is uploading a big file.
[tags]wimp, lamp, iis, cgi, the specified cgi application misbehaved, php, cgi error[/tags]