Author |
|
MrBob
Joined: 26 Mar 2007 Posts: 4
|
Posted: Mon 26 Mar '07 22:39 Post subject: JPEG's not displaying |
|
|
I'm setting up a site for my wife's photography business. She has many images on the site in JPEG format. Most will display only part of the photo. I tracked it down, & it seems to be related to the file size. Those around 75k load just fine. Anything 180k+ either doesn't load or loads only partially.
I tried:
EnableMMAP off
EnableSendFile off
Win32DisableAcceptEx
None of these had an effect. Any other ideas?
-MrBob |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Tue 27 Mar '07 0:10 Post subject: |
|
|
Not much info to work with here... but lots of people serve big .jpg's using Apache 2.2.4 on Windows 2000/2003/XP
- either the version available here at Apache Lounge (built with Visual C++ 2005) or the Windows binary from httpd.apache.org (built with Visual C++ 6.0).
Win32DisableAcceptEx was the most likely fix.
Check that it prints "Disabled use of AcceptEx() WinSock2 API" in logs\error.log to be sure it is really being processed.
Nothing in logs\error.log?
Does the size of the response shown in logs\access.log match the .jpg file size, or does it seem closer to the portion of the image you actually get?
If you run a browser on the same machine and request http://localhost/something.jpg does it display fully?
If so - the problem may be with something downstream from Apache, like your router or service provider.
Another thing to try; use something other than a browser.
You can get the wget program for Windows from the GNU Windows32 library and try retrieving a .jpg into a file with wget.
Then check the size of the retrieved file vs. the original .jpg. If is the correct size, you will know that Apache is delivering all the data
- so the problem is probably mime-types, headers, etc. instead of data truncation.
-tom- |
|
Back to top |
|
MrBob
Joined: 26 Mar 2007 Posts: 4
|
Posted: Tue 27 Mar '07 0:17 Post subject: |
|
|
I'm actually using 2.0.59 on WinXP from httpd.apach.org.
I'll check logs\error.log for the AcceptEx line, but saw nothing else to indicate a problem.
I'll have to look @ access.log.
A browser on the same machine doesn't display fully, checked that.
Will do on wget.
Thanks for the tips.
-MrBob |
|
Back to top |
|
Jorge
Joined: 12 Mar 2006 Posts: 376 Location: Belgium
|
Posted: Tue 27 Mar '07 7:50 Post subject: |
|
|
Are you using any output filters? mod_deflate? others? |
|
Back to top |
|
MrBob
Joined: 26 Mar 2007 Posts: 4
|
Posted: Tue 27 Mar '07 17:14 Post subject: |
|
|
Mod_deflate is commented out in httpd.conf.
I upgraded to Apache 2.2.4 & the problem persists.
Win32DisableAcceptEx is functioning - saw it in the log; wget shows that I'm getting the full file size, so that seems to indicate a MIME or header issue.
I'm clueless, where do I look for those sorts of issues?
-MrBob |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Tue 27 Mar '07 17:30 Post subject: |
|
|
Try wget again, this time with the -d switch.
This will show you the details of the dialog with your server.
Did your Apache logs\access.log show the correct length when you get a partial jpg via a browser?
Is it different when you use wget?
The browser menu [Tools] [Page info] in Firefox might shed some light on the problem.
The Type should be image/jpeg and the Size should be the correct number of bytes.
IE has [File] [Properties], but this doesn't show as much.
-tom- |
|
Back to top |
|
MrBob
Joined: 26 Mar 2007 Posts: 4
|
Posted: Tue 27 Mar '07 17:43 Post subject: |
|
|
After trying it in Firefox & seeing it work, I realized I hadn't cleared my cache since the Apache upgrade. All is well now!
Thanks for the help.
-MrBob |
|
Back to top |
|