ID: 25834 Comment by: willy at vuboys dot nl Reported By: sales at 4web-space dot com Status: Bogus Bug Type: CGI related Operating System: windows 2003 standard PHP Version: 4.3.3 New Comment:
I would really like to be able to reproduce, but this happens on rare occasions and a refresh almost every time makes it work. I don;t think it is a problem on Apache; only IIS as far as I know. If I am able to reproduce I get back to you guy's. Previous Comments: ------------------------------------------------------------------------ [2004-01-27 16:08:46] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip And also, use Apache. If you can reproduce this with apache, reopen. ------------------------------------------------------------------------ [2004-01-27 14:58:57] sales at 4web-space dot com Yes i hadnt seen it for a long time running php4.3.4 and the other day i got it but refreshing the page made it disappear. Very strange bug! Robbie ------------------------------------------------------------------------ [2004-01-27 11:35:00] willy at vuboys dot nl Hello, I get reports from different users running PHP in CGI mode on a Windows platform about the same issue. The strange thing is that it does not happen all the time, but occasonally. Hitting refresh in the browser will load the page afterwards without a problem. As far as I know it is still happening on PHP4.3.4. Is there something in the PHP script what can be done to prevent it? or is it a bug in PHP itself? ------------------------------------------------------------------------ [2003-10-11 08:03:30] sales at 4web-space dot com Description: ------------ Hello, thought i submitted this before but obviously not PHP scripts are intermittently returning CGI Error - did not return a full set of headers This was also a problem with perl and Microsoft pointed it out to be the following problem. The following solved the same error in Perl and from what I understand headers are nothing to do what the coder adds to their php scripts but what php.exe puts in. Anyway here is what they say im hoping its what the problem is (please read IIS6's rules that are enforced) Even though these rules are enforced they only cause intermittent issues with scripts Basically IIS6 enforces additional rules that previous IIS versions didnt For your CGI, it needs: print "Status: 200 OK\r\n" There are a couple of CGI rules being enforced on IIS6: 1. Per CGI 1.1, a response must contain the "Content-Type" header, optionally the "Location" header, and also indicate the Status code via either the "Status" header or something like "HTTP/1.1 200 OK\r\n". This is a big gotcha for people. 2. Headers must be terminated with \r\n per HTTP 1.1 spec. #2 has some peculiarities in that depending on the CRT's IO Mode -- in Text mode, "\r" will be inserted for you for every "\n", while in Binary mode, no such thing is done. This means that since you need to be certain that "\r\n" terminates every header for IIS -- either you run in binary mode and send the "\r\n" yourself, or you run in text mode and only send "\n". Reproduce code: --------------- any code Expected result: ---------------- it will load all the time Actual result: -------------- intermittent cgi errors - not returning full set of headers ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25834&edit=1