me salio un error rarisimo en un nuevo servidor al intentar instalar spip y
vi que es un bug de php
“CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers.”
That’s the strange error message that came up today when I was working on a
crawling PHP script. First I was thinking about a timeout issue, so I’ve
tried to put a set_time_limit(0) there, but it didn’t work. Then I started
to search with google.
I finally came up to this page: http://bugs.php.net/bug.php?id=25863 . I
started looking at the “Observations” on the beginning of the page… My
scripts runs on a Windows 2003 server with IIS and PHP running as a CGI
script. Altought my script doesn’t use frames, it executes a lot of MySQL
queries and it doesn’t use a header(”Location: …”) function, it uses
Javascript redirect… It executes
echo ‘<script language=”JavaScript”>’ . “\n”;
echo ‘document.location=….’ . “\n”;
echo ‘</script>’;
die();
I went crazy with that bug. I tried to put there some random printouts,
sleep() functions and other, nothing worked… The worse thing was that the
problem seemed to come up randomly, sometimes the error message appeared,
sometimes it seemed to work just fine. Finally I came to the end of the page
at http://bugs.php.net/bug.php?id=25863 and found that it can be solved by
adding a simple header(”Connection: close”); at the beginning of the script.
This has FINALLY solved the problem for me.
Now I have other problems with that script… but that’s another story…