Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Feb 2009
    Posts
    36
    Plugin Contributions
    0

    Default Some images are broken?

    I'm having an odd issue with my site. Some of my images are suddenly showing up as broken links.

    EXAMPLE: http://whatthecraft.com/shop/index.p...products_id=78

    On the above page, there should be an image under the "FAQs" in the product description with information about a coupon code. It's no longer showing up. I double checked that the image is in the correct location and even re-uploaded it, which did nothing.

    Some of the images are "half working". If you look at that same page I linked to above, all of the product images will load the larger pop-up image fine EXCEPT for the very last image. Again, I double checked the file location and re-uploaded it, and it still doesn't show up. My other listings have similar problems. Most of the images pop-up properly, but one or two load a blank pop-up.

    For the image pop-ups that do work, I noticed that if I copy the image location, the URL looks like this:
    http://whatthecraft.com/shop/bmz_cac...ge.397x550.jpg

    For the images with the pop-ups that aren't working, the image URL looks like this:
    http://whatthecraft.com/shop/images/...pattern_06.jpg

    I thought this might be an issue with Image Handler, so I reinstalled it, but it didn't seem to help.

    Also, I'm not sure if this problem is related or not, but if I try to navigate to the image URLs (http://whatthecraft.com/shop/images/buymoresave.jpg), it says "Under Maintenance". The same goes for trying to navigate to every image on my site, even the ones that are showing up properly.

    Aside from the reinstallation of IH4 earlier today, I haven't made any changes to the site in quite some time. The most recent change to my site was switching hosts a few months back, though I don't know if this problem started then or more recently.

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Some images are broken?

    The problem is related to file permissions.
    --------------------------------------
    Failed to load resource: the server responded with a status of 403 (Forbidden)
    --------------------------------------

    Cheers
    RodG

  3. #3
    Join Date
    Feb 2009
    Posts
    36
    Plugin Contributions
    0

    Default Re: Some images are broken?

    All of my image directories are set to 755. The files are set to 644. Am I missing something?

  4. #4
    Join Date
    Feb 2009
    Posts
    36
    Plugin Contributions
    0

    Default Re: Some images are broken?

    I've been searching all last night and this morning for someone else experiencing a similar problem. The closest I could find was this person having issues with Wordpress after moving from shared hosting to VPS: https://wordpress.org/support/topic/...hosting-to-vps

    They finally solved it by installing some Apache modules. I did have some issues when I first moved my site and had to install GD Library. So I just rebuilt Apache with the following: Zip Module, mCrypt module, mbString module, and MySQLi. It doesn't seem to have worked.

    Most of the server stuff is way over my head anyway, so I don't even know if I was even on the right track with that. :/


    Also, I don't think I made this clear before, but the thing I find most confusing is that this isn't effecting just the old images or just the new images. It's some of both. I added 2 new products last night and out of 12 images, only 2 don't work.
    Last edited by smarmyclothes; 13 Apr 2014 at 05:37 PM.

  5. #5
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Some images are broken?

    Quote Originally Posted by smarmyclothes View Post
    The closest I could find was this person having issues with Wordpress
    The fact that you have a wordpress installation did cross my mind, but I was hoping it wouldn't come to that.

    Could you please take a look at the file /images/index.html and see if it contains "Under Maintenance". (A default installation doesn't have this).
    Based on the *assumption* that yours doesn't either, we have to assume that this text is being generated by WordPress, but why WordPress would be reacting to stuff in the zencart/images folder is a bit of a mystery to me.

    My gut feeling is telling me that you have a rule in your .htaccess file (top level) that is causing a redirect or rewrite going on. (Assuming all file/folder permissions are correct). Hmmm, as well as permissions, you should also take note of the 'ownership' of the files. This normally isn't an issue, but they can get messed up if the site has been relocated from another server.

    Quote Originally Posted by smarmyclothes View Post
    They finally solved it by installing some Apache modules. I did have some issues when I first moved my site and had to install GD Library. So I just rebuilt Apache with the following: Zip Module, mCrypt module, mbString module, and MySQLi. It doesn't seem to have worked.
    This doesn't look or behave like a server issue. A configuration issue, yes.

    Quote Originally Posted by smarmyclothes View Post
    Most of the server stuff is way over my head anyway, so I don't even know if I was even on the right track with that. :/
    Probably not. As long as you didn't make things any worse it was worth a shot though.

    Quote Originally Posted by smarmyclothes View Post
    Also, I don't think I made this clear before, but the thing I find most confusing is that this isn't effecting just the old images or just the new images. It's some of both. I added 2 new products last night and out of 12 images, only 2 don't work.
    This could be a clue. How are you uploading the images?

    Could you also provide the name of one of these new images that you are NOT having a problem with. I'm not sure if it'll help or not, but I'd like to see and confirm this for myself (Not that I don't trust your findings), but if true, then my initial gut feeling doesn't hold much water.

    Another thing for you to do (Not as a fix, but as a process of elimination) is to rename or delete your .htaccess file (make a backup copy before deleting). See if the problem goes away. ZenCart doesn't *need* this file. (Wordpress does).

    I'm trying to determine whether it is wordpress related, or ZenCart specific.

    Another thing to try is set the permissions on your /images/ folder to '777' (IF you get a server error try 775)
    You can also try setting one of the images with the problem to 666 (with the folder still set to 777 or 775).

    These are about as 'relaxed' as the permissions can be and even if the 'ownership' is mussed up these permissions should allow anyone to read the files.

    So, several things for you to do and check, I'm sure that at least one of them will provide the clues we need to narrow things down.

    Cheers
    RodG
    Last edited by RodG; 13 Apr 2014 at 06:19 PM.

  6. #6
    Join Date
    Feb 2009
    Posts
    36
    Plugin Contributions
    0

    Default Re: Some images are broken?

    I don't appear to have a /images/index.html file

    All of the owner/group settings are 500 501 for both the files and directories.

    Changing the file and directory permissions to 666 and 777 respectively did not work.

    Here's an image I uploaded last night that works:
    http://whatthecraft.com/shop/bmz_cac...ge.750x728.jpg

    However, only the bmzcache version works. The actual file gives the same error:
    http://whatthecraft.com/shop/images/...pattern_03.jpg

    I uploaded the images via FTP.

    The bmzcache issue makes me think something is going on with Image Handler- though I'm not sure if I have two separate problems (Image Handler not caching some images AND something with the permissions) or just one.

    I've been trying to figure out if there's a pattern, and I finally noticed one: all of the images that have no cached version are short. Most of my images are similar width-wise, but the ones that don't work are all under a certain number of pixels in height.
    Last edited by smarmyclothes; 13 Apr 2014 at 06:40 PM.

  7. #7
    Join Date
    Feb 2009
    Posts
    36
    Plugin Contributions
    0

    Default Re: Some images are broken?

    Update: I decided to uninstall IH4. The result is that now none of my images work, I guess because the cached versions are gone.
    I re-installed IH4, but the images still don't work (not a surprise).

    On the bright side, I guess I can say for sure that it's not a problem with IH4.

  8. #8
    Join Date
    Feb 2009
    Posts
    36
    Plugin Contributions
    0

    Default Re: Some images are broken?

    Alright, I posted too soon. When I reinstalled IH4, I forgot to set "IH resizes images" to Yes. So my images are showing up again- still having the issues with the actual image URLS not working, just the bmzcache versions show up.

    Also, I tried increasing the size of one of the "short" images, as I mentioned above, and that image (bmz cache version) works now. So I don't know why the pixel height matters, but for some reason, it does.

  9. #9
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Some images are broken?

    Quote Originally Posted by smarmyclothes View Post
    I don't appear to have a /images/index.html file
    I can only guess it has been deleted at some time. This has been a part of the zencart installation files since at least V1.3.7.

    It's probably not important that its missing. I was thinking that this could be where the "Under Maintenance" text was coming from. Since the file doesn't exist it can't be coming from there.

    Quote Originally Posted by smarmyclothes View Post
    All of the owner/group settings are 500 501 for both the files and directories.
    Alas, I am unable to tell you if this is correct or not. This will be different from server to server and owner to owner. The important thing in this case is that they are consistent. )bad files and good files).

    Quote Originally Posted by smarmyclothes View Post
    Changing the file and directory permissions to 666 and 777 respectively did not work.
    This comes as a little bit of a surprise. I would suggest you leave them this way, at least until the issue has been solved (just in case there is a combination of factors at play, with this being one of them)

    Quote Originally Posted by smarmyclothes View Post
    Here's an image I uploaded last night that works:
    http://whatthecraft.com/shop/bmz_cac...ge.750x728.jpg

    However, only the bmzcache version works. The actual file gives the same error:
    http://whatthecraft.com/shop/images/...pattern_03.jpg
    This is exactly what I was going to be looking for. You've saved me the trouble. :)

    Quote Originally Posted by smarmyclothes View Post
    I uploaded the images via FTP.
    You should double check that the uploads are being successfully completed.. (Compare the filesizes)

    Quote Originally Posted by smarmyclothes View Post
    The bmzcache issue makes me think something is going on with Image Handler- though I'm not sure if I have two separate problems (Image Handler not caching some images AND something with the permissions) or just one.
    This is also my line of thought, but the two could be related... if IH4 can't read the /images/ files it won't be able to create the cached versions, so only the previously cached versions will be shown... BUT, my thoughts are that since the images can't be viewed via a direct link due to the permissions error then this is most likely to be the source of the problem, so in my mind, step#1 to resolving the issue is to get the files readable via a direct link (and hopefully that would also allow IH4 to read and cache them)... problem solved - Well, that was my theory.

    Quote Originally Posted by smarmyclothes View Post
    I've been trying to figure out if there's a pattern, and I finally noticed one: all of the images that have no cached version are short. Most of my images are similar width-wise, but the ones that don't work are all under a certain number of pixels in height.
    I've never heard about this happening before, and I'm not saying you are wrong.... I'm still at the stage of trying to figure out why none of the files in the /images/ folder are readable via a direct link. Or am I mistaken here? I am somewhat limited in my testing here because I can only test using the names of the files that you've told me about. Having said that, I did try using a couple of 'known' images (call_for_price.jpg and no_picture.gif) with very confusing results.

    In both cases, the main page gets displayed rather than the actual images. ZenCart doesn't generally do this (in my experience), which leads me back to thinking that there is a redirect/rewrite going on (.htaccess file?) or perhaps some processing that your WP is doing(???). This is why I suggested you rename or delete the .htaccess file so as to eliminate this possibility.

    The other oddity I noticed was that a request to view the 'call_for_price.jpg file gives the following error:
    ---------------------------------------------------------------------------------------
    Resource interpreted as Image but transferred with MIME type text/html:
    --------------------------------------------------------------------------------------

    The no_picture.gif has the same redirect going on, but without any error being reported.
    I haven't quite figured out what this means yet, but I'm convinced it is somehow relevant to the problem(s)

    Quote Originally Posted by smarmyclothes View Post
    Alright, I posted too soon. When I reinstalled IH4, I forgot to set "IH resizes images" to Yes. So my images are showing up again- still having the issues with the actual image URLS not working, just the bmzcache versions show up.
    Are *all* the images now showing, or is it still only the ones that have been previously cached?

    Quote Originally Posted by smarmyclothes View Post
    Also, I tried increasing the size of one of the "short" images, as I mentioned above, and that image (bmz cache version) works now. So I don't know why the pixel height matters, but for some reason, it does.
    Very interesting. I don't suppose you've figured out at exactly what pixel height it fails? (I'm not sure how important this could be, but if you find it needs to be under (say) 10px, then perhaps searching through the code for this value may determine if a coded limitation has been met. (Clutching at straws here).

    Another thing I would suggest would be to disable/uninstall IH4 and see what happens. Although I've never actually found IH4 to be the *cause* of any issues, in a case like this it will be prudent to at least get things working *without* this add-on. If you can do this, and then find the problem returns when re-installed we can then concentrate solely on what IH4 is doing without concerning ourselves with possible permissions errors. If you still have the problem without IH4 we would have eliminated this as having any bearing on the matter, which will reduce the number of places to look for the apparent size related matter.

    So there you have it.
    Remove/delete your .htaccess file. Remove or disable IH4, and that will give us a pretty good place for further diagnosis.

    Its the old Sherlock Holmes adage. "when you have eliminated the impossible, whatever remains, however improbable, must be the truth".

    What we are doing is eliminating as much as we can to narrow down the cause.

    Cheers
    RodG
    Last edited by RodG; 14 Apr 2014 at 11:14 AM.

  10. #10
    Join Date
    Feb 2009
    Posts
    36
    Plugin Contributions
    0

    Default Re: Some images are broken?

    Thank you for helping me with this. I really appreciate it.

    And sorry for the confusing mess of posts. I'll try not to bounce around so much. In all of the above posts, when I say the images "work", I mean the pop ups work correctly- but only the cached versions. I still can't view them via direct link.

    Also, I should point out that my template images are accessible via direct link (logo, etc.). This problem seems to be only effecting the images in the /images folder. Link to the functioning logo, for example: http://whatthecraft.com/shop/include...s/shoplogo.png


    In terms of Image Handler: I uninstalled it yesterday, which included deleting all of the cached images and folders. The result was that none of my images showed up. No thumbnails, nothing. Nor were they accessible via direct link.

    I reinstalled Image Handler, thinking perhaps it would cache all of the images, even if it wouldn't fix the permissions issue. It cached the exact same images as before. So as it stands now, the cached images show up, but again, none of them are accessible via direct link.

    And I think I've solved the mystery as to why there aren't cached versions of the "shorter" images. I have Image Handler set to resize images that are larger than 750 px wide and 550 px tall. The images under 550 px are not being resized, and thus are not being cached. So I suppose I have IH to thank for my site being at all functional at this point. :)

    So on to the .htaccess file. I deleted the top level file. The images are still not accessible, but it did get rid of the "Under Maintenance" message. Now it's just a generic "Forbidden" error.

    Example: http://whatthecraft.com/shop/images/...pattern_03.jpg

    /images directory is still set to 777 with the images set to 666.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Only some of my images not showing in Internet Explorer, Chrome and Firefox are okay.
    By AmyCapolupo in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 9 Oct 2013, 12:34 AM
  2. v151 Some EZ pages are SSL and some are not
    By EHSI in forum General Questions
    Replies: 4
    Last Post: 2 Oct 2013, 08:45 PM
  3. some products are listed alphabetically and others are not
    By Dale Dugas in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 21 Feb 2010, 07:50 PM
  4. Some images are blurred
    By RonGin in forum Upgrading from 1.3.x to 1.3.9
    Replies: 0
    Last Post: 17 Mar 2009, 02:31 PM
  5. Newsletters - some are going out blank, some not
    By ps* in forum General Questions
    Replies: 3
    Last Post: 17 Jul 2007, 05:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg