I have a PHP-driven website that uses output buffering, generates the entire page and spits out a couple of headers (Content-Type
and Content-Length
) before sending the actual page contents.
This works fine on my local Apache server but as soon as I uploaded it to my web host (also Apache), it failed with a 500 Internal Server Error, which I finally traced to the Content-Length
header. I simply removed the header (it isn't really important) and it works fine since.
Now I'm just curious as to why this happened in the first place - is there some kind of server setting that disallows scripts from adding this specific header?