Forums / General Questions / Be Careful Naming Your Images...

Be Careful Naming Your Images...

Views: 471

Results 1 to 3 of 3
15 Nov 2011, 12:08 AM
#1
joejoejoe avatar

joejoejoe

Zen Follower

Join Date:
Oct 2011
Location:
AZ
Posts:
383
Plugin Contributions:
0

Be Careful Naming Your Images...

Short version: an image with a name starting "ID-" and ending in a number throws up errors.

Long version:
I had a product that should have sold - I was offering it at 1/4 the price on Amazon, but despite being featured it never did. So today I looked at the product. I thought it looked good, maybe I had uploaded a lousy picture - so I clicked on the second pic and a small screen pops up: Error 501 CODE NOT IMPLEMENTED /.php or something like that.

I went into a panic, I'd just done a move to a new host and my first thought is that it must have been some script injected into the image. I go offline, run a scan, nothing found. I download the image and compare it byte for byte with the original image I'd saved to disc months ago - it's identical.

I tried taking a new photo and uploading it - same error.
I deleted the product and recreated it - same error
I delteted the product and recreated it with a 3rd new photo - same error.

All my other images and additional images were working.
Then, on a whim I changed the name of the image.
It had been ID-Stamper_1.JPG
I named it Stamper_1.jpg

And the errors went away. Interesingly enough, the main image was called ID-Stamper.JPG and it worked fine like that, (I had to change it to Stamper.JPG to get the additional photo to show) so I guess it's the combination of ID and a number, or something in the handler for additional images but from now on I'll be avoiding that naming combination.

PS: I'm running 1.3.9h powered by a Linux Server, from the comfort of a cheap leather swivel chair in my home office powered by Doritos.

15 Nov 2011, 2:40 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Be Careful Naming Your Images...

You should be reporting that problem to your hosting company's server administrator so they can fix the problem

.
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.

15 Nov 2011, 3:16 AM
#3
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: Be Careful Naming Your Images...

I agree. Other than potential issues with Google Merchant Center feeds, Zen Cart doesn't really care what the name of the image file is. And even that isn't really a Zen Cart problem.

The best way to learn is to try stuff. But, back it up first.