Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

None of my images are displaying


Guest

Recommended Posts

I recently install the latest version of Oscommerce 2.3.4 after running an older version for several years.

I decided to start from scratch instead of doing an upgrade as I only have 2 products.

Everthing works great I am happy with the functionality.

My only gripe and problem is none of the images I have uploaded display.

This includes the store logo or product images.

Can someone point me in the right direction to fix this problem.

Link to comment
Share on other sites

  1. Check that the images were uploaded to the right place (i.e., where the resulting HTML is looking for them)

Check the permissions of the images -- should be 644 on a Linux server (444 is OK). On some servers, it might be something like 604

Directly display the images in your browser (pull up the address of where the image is)

If (3) doesn't display, perhaps you accidentally corrupted the images while down/uploading them. Hopefully you have backups of them.

Link to comment
Share on other sites

Thank you for the response.

 

1. Yes they are uploaded to the right folder.

2. Yes permissions are good.

3. No love there I get a 500 error - Internal Server Error

4. Tried that still no love.

 

Ok after looking into 500 error - Internal Server Error I deleted the .htaccess file and my images are displaying.

Looking at the .htaccess file it states it is there to restrict access to anything other than images.

Here is the content of the .htaccess file:

 

# $Id$
#
# This is used to restrict access to this folder to anything other
# than images

# Prevents any script files from being accessed from the images folder
<FilesMatch "\.(php([0-9]|s)?|s?p?html|cgi|pl|exe)$">
   Order Deny,Allow
   Deny from all
</FilesMatch>

Options -Indexes

 

So I deleted the .htaccess file and all the images display, found the love.

But I promptly put it back as I am concerned with the security of the site.

 

Now I have another question.

Since the folder only contains image files is it ok to go ahead and delete the .htaccess file?
 

Link to comment
Share on other sites

OK, you've shown that the problem is not with the images, but with your .htaccess file. Looking at it, I would try commenting out (#) the Options -Indexes line. Many hosts no longer permit the Options command, and you will have to find some other way to stop people from peeking into image directories, etc. There are at least two ways to do this:

  1. put an empty index.html file in any directory that doesn't have an index.php (or one that says something cute like "Nothing to see here, folks. Move along!")
  2. Add /NoIndex.html to the end of a (full) DirectoryIndex command in .htaccess, and add that file to your site root
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...