Brion Vibber:
Found the problem. It seems that the buffer is being passed by reference on PHP 4.1; the variable is modified by the function and all goes to hell. Making a copy to operate on gets things working.
Diff attached; fix just added to CVS head and 1.3 branch.
This solves the runaway, but it's not working correctly yet.
When I request a normal article anonymously with the cache enabled, my browser shows gibberish (Firefox) or a download dialog (IE). I've looked at the headers with wget -S, and there's no:
Content-Encoding: gzip