Page MenuHomePhabricator

"Premature end of script headers" in api.php
Closed, InvalidPublic

Description

After svn up'ing my test installation, I get an HTTP 500 (Internal Server Error) for every request to api.php. Apache's error log says "Premature end of script headers: php-cgi.exe" (that's right, I'm on Windows and am running PHP as a CGI). Strangely, index.php works just fine. I'm pretty sure this is caused by something introduced in the past week (it worked a week ago). I tried reverting the Wiki.php rewrite, but that didn't solve anything.

Unfortunately, Apache/PHP don't provide a very detailed error message (what I mentioned earlier was the entire message) so I don't have the faintest clue as to how to debug this, other than tracking by revert (reverting today's commits, then yesterday's, etc. until it starts working, then refine by the hour till I nailed the revision responsible) which I intend to do tomorrow. If anybody thinks they may have caused this, or has a similar setup and manages to debug this properly, please let me know (preferably *before* I start tracking this thing down myself).


Version: 1.13.x
Severity: enhancement

Details

Reference
bz13496

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:03 PM
bzimport set Reference to bz13496.
bzimport added a subscriber: Unknown Object (MLST).

Bryan.TongMinh wrote:

Just a short note that it works for me for the latest trunk, using the latest PHP 5.2 and running as FastCGI with Abyss Web Server.

WTF!

I svn up'ed, it didn't work. I reverted Tuesday's and Monday's revisions, it didn't work. I reverted Sunday's too, it worked again. After noticing none of Sunday's commits could have caused this, I went back to HEAD, which magically works again.

Weird...

(In reply to comment #2)
I went back to HEAD, which magically

works again.

I discovered I actually had a locally modified copy of ApiBase.php lying around. One of my modifications was to do if($this->makeHelpMsg()) in ApiBase::makeHelpMsg(), causing an infinite recursion.