I am bringing up an image directly through firefox (no PHP or other scripting code) and it appears that Apache is returning either a truncated image or a corrupted image.

I get the top 5-10% of the image. It appears that I get complete width and height info.

If I hit "refresh" (in firefox) I get about 5 more lines of the image. And if I hit refresh again I get another 5 lines.

In IE I get the same initial 5-10% of the top of the file. But refresh does not give me any more.

Bringing the image up across the network through a mapped-drive reveals the entire image. (so the image(s) itself seems to be okay).

(If I point firefox to the image via mapped-drive rather than through Apache firefox brings the image up just fine. So it does seem to be Apache at issue)

Any ideas?


What operating system is this on ? Is the file you are serving local to the server apache runs on, or is it also accessed over the network ?

You could try the following directives in your Apache httpd configuration file to see whether it is due to problems using the sendfile-systemcall or MMAPing :

EnableSendfile Off
EnableMMAP Off

(http://httpd.apache.org/docs/2.2/mod/core.html has more information on those)

I have seen those two be the culprits before, though only if there was something funky going on with the storage subsystem. It is usually a bad idea to disable these, since it eats into performance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.