Right now I\'m trying to serve CSS and JS files from a server that won\'t let me enable mod_gzip or mod_deflate. So I wrote a small PHP script to
To solve your firefox issue, I think you need to include header( "Content-Encoding: gzip" ); so that the browser knows to decompress the content.
As for the content length, you can try just leaving this value off, or try to figure out a way to use "Transfer-Encoding: chunked" (you can't jsut send this header, you need to format the data specially for it). It is possible that ob_end_flush automatically enables chunking.
I recommend you get wireshark and capture what your php script is sending and compare it to a properly behaving server to see what headers, etc are missing.