Forums / Setting Up Categories, Products, Attributes / Product image upload fails, suddenly

Product image upload fails, suddenly

Views: 1,232

Results 1 to 9 of 9
19 Jul 2015, 5:15 AM
#1
big_ben avatar

big_ben

New Zenner

Join Date:
Oct 2011
Location:
Australia
Posts:
23
Plugin Contributions:
0

Product image upload fails, suddenly

I have 3 totally separate zencart sites running with the same remote host server.

2 are on v 1.3.9d and one on 1.5.1
All have been working for years with no problems.

One site ( on v1.3.9d) has suddenly refused to upload product images through the normal catalogue method for adding new products.

When editing a product - I add the image file as have done previously - click preview - get error message - "error: file upload not saved".

The html editor for the addition of product text details is working normally.

I have checked with the host server and settings look identical to the other sites which are still working perfectly - host tech guys suggest and I suspect - file corruption somewhere probably from gratuitous "update" sometime.

Although for my sins my main computer from which I am uploading is on WIN 8 OS with all the problems that entails - I have tried others on different OS with the same result.

Internet connections are private wireless and better than ADSL2+ and upload speed is min 1Mbit - images are less than 100 kb - and in any case speed and img size are no different to those of the other working sites.

The site itself i.e. all the existing products and functions still seems to be working normally.
Just cannot at present add any new ones.

Would appreciate any advice particularly some clues to where in the zen folders I should look first
to repair.

Thanks,

Big Ben

19 Jul 2015, 5:45 AM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Product image upload fails, suddenly

  1. Check that the /images/ folder and sub folder permissions are set as '777' (If you get a 'Server 500 error' set them to '775')
  2. If you are trying to upload an image with the same name as an existing image check that the permissions of the existing file is 664 or higher.
  3. If the image folder permissions are correct (777 or 775) and this is a NEW file you are uploading, then seek help from your host. The problem is at their end, and only they will be able to fix it.

Oh, and before doing anything - Check that you haven't used all of your allocated disk space. :-)

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

19 Jul 2015, 5:48 AM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Product image upload fails, suddenly

Uploads folder permissions? Able to ftp to the location even though unable to upload via clicking the "button".

Php version as reported by the applicable ZC admin panel?

Tried adding product? Tried adding product of different product types? If able to add product with an image, try modifying that product, anything?

Just some thoughts...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

19 Jul 2015, 5:54 AM
#4
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Product image upload fails, suddenly

Almost forgot. Make sure the image filenames don't contain a space or any other non-alphaNumeric character.

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

19 Jul 2015, 10:21 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: Product image upload fails, suddenly

Big Ben:

"error: file upload not saved".
The 'Error: File upload not saved.' response occurs AFTER the system has already checked that the incoming file "got uploaded" to PHP's temporary upload location, that its size and filename-extension (ie: ".jpg") are okay according to your settings in your admin, and that the destination folder is writable as far as permissions go. (And different error messages would appear if any of those were the problem.)

So, at this point the most likely cause is that your hosting account has maxed out its storage quota.

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

20 Jul 2015, 9:39 PM
#6
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Product image upload fails, suddenly

DrByte:

The 'Error: File upload not saved.' response occurs AFTER the system has already checked that the incoming file "got uploaded" to PHP's temporary upload location, that its size and filename-extension (ie: ".jpg") are okay according to your settings in your admin, and that the destination folder is writable as far as permissions go. (And different error messages would appear if any of those were the problem.)

Excellent info there DrByte.

I consider this to be one of those things I should have known, but didn't.

It sure narrows down the possible causes of the OP's problem doesn't it.

Cheers
RodG

ps. Do you happen to know offhand what the error response would be if the PHP temp file upload location is unwritable? (as this is/was one of the possible causes that I was thinking it could be)

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

2 Aug 2015, 1:25 AM
#7
big_ben avatar

big_ben

New Zenner

Join Date:
Oct 2011
Location:
Australia
Posts:
23
Plugin Contributions:
0

Re: Product image upload fails, suddenly

Had this answer from host sever.

"It looks like you have maxed out the number of files allowed on your server. It is not about the size but it's about the number of files. You're##re only allowed 89999##files. Anything that you no longer need should be removed from the server."

Where are the easiest files to delete - I have 5 templates in the file system but these don't seem to contain much in the way of file numbers.
Use only English - should I get rid of all other language files?

Can't imagine where 90,000 exist!

Ben

2 Aug 2015, 1:33 AM
#8
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Product image upload fails, suddenly

Big Ben:

"It looks like you have maxed out the number of files allowed on your server. It is not about the size but it's about the number of files. You're##re only allowed 89999##files. Anything that you no longer need should be removed from the server."

Where are the easiest files to delete - I have 5 templates in the file system but these don't seem to contain much in the way of file numbers.
Use only English - should I get rid of all other language files?

Can't imagine where 90,000 exist!

Ben

Yes, you can get rid of the language files that you don't use, but this almost certainly won't be enough for a good/long term solution.

I'm going to go out on a limb here and say that the majority of these files are log files, and these are the 1st ones to delete (especially if they go back many months, or possibly years).

The log files will be found in the
/logs/ folder (latest versions of Zencart)
and/or the
/cache/ (older versions of zencart).

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

3 Aug 2015, 4:23 PM
#9
drbyte avatar

drbyte

Sensei

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

Re: Product image upload fails, suddenly

RodG:

ps. Do you happen to know offhand what the error response would be if the PHP temp file upload location is unwritable? (as this is/was one of the possible causes that I was thinking it could be)
The logic is all contained in the 'upload' class file.

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