Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2009
    Posts
    36
    Plugin Contributions
    0

    help question some images not displaying because they're JPG instead of jpg

    Hi, this is a second issue I am having with my migration to a new server.

    A whole bunch of jpg images on our site have a capitalised file extension .JPG instead of .jpg. This never posed a problem for us on Bluehost, but on the new server and on our local machine these images do not display.

    I can correct one by one by changing the database file reference and then manually changing the file name to lower case, but that would take forever!

    Would anybody be able to shed some light on this?

    Thanks :-)

  2. #2
    Join Date
    Mar 2009
    Location
    Australia
    Posts
    604
    Plugin Contributions
    0

    Default Re: some images not displaying because they're JPG instead of jpg

    I can't name other software in here but i suggest you do a search in google for these keywords.

    rename file extensions bulk
    That wasn't the plan!

  3. #3
    Join Date
    May 2010
    Posts
    32
    Plugin Contributions
    0

    Default Re: some images not displaying because they're JPG instead of jpg

    This sounds like a windows vs unix issue. To the filesystem on Windows, upper case and lower case names are identical. Not so on Unix.

    What I would do, because I'm developing on a Windows system, is simply type this at a command prompt in the directory where the images are found:

    rename *.JPG *.jpg

    Assuming the database records contain lowercase .jpg

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

    Default Re: some images not displaying because they're JPG instead of jpg

    I don't use Windows. Home computer is Ubuntu 10.04. Old server is Bluehost running CentOS (5.2 I think). New server is running 10.04.

    Everything works on Bluehost. But doesn't on my Ubuntu boxes.

    There is no mis-match between the file names and their associated references in the DB.

    But I have to change the DB reference to have lower case .jpg and then also change the actual file name itself.


  5. #5
    Join Date
    Oct 2009
    Posts
    36
    Plugin Contributions
    0

    Default Re: some images not displaying because they're JPG instead of jpg

    Further, I have discovered that browsing directly to those images presents a 403 forbidden error. Changing them to lower case .jpg on the extension allows the image to be viewed.

    So there must be a setting in Apache somewhere? One that is set on Bluehost but not on my Ubuntu boxes.

    Any ideas?

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: some images not displaying because they're JPG instead of jpg

    What version of Zen Cart?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

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

    Default Re: some images not displaying because they're JPG instead of jpg

    My apologies, I resolved this with somebody on the Ubuntu forums. It was an htaccess directive only allowing certain file types - supposedly for security.

    I amended this and it fixed the problem.

    Thanks
    Nathan

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: some images not displaying because they're JPG instead of jpg

    The latest version of Zen Cart includes .jpg and .JPG allowance in its .htaccess files.
    If you went and removed the restrictions, then you've removed security protections which are intended to safeguard you from hackers abusing your site for phishing activities.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Looking for MYSQL Query to change image extension from .JPG to .jpg
    By JDMEngineLand in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 20 Dec 2011, 02:11 PM
  2. Need help fixing quality when going from .JPG to .GIF and back to .JPG???
    By Gsk8r18 in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 8 Mar 2011, 07:51 PM
  3. Replies: 3
    Last Post: 7 Feb 2011, 06:23 AM
  4. Replies: 2
    Last Post: 20 Nov 2008, 12:16 AM
  5. FILE_EXISTS for ZEN CART picture file system: pic.jpg pic_01.jpg pic_01_lrg.jpg
    By edwardtilbury in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 14 Nov 2008, 10:29 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR