Jump to content

An error occurred while uploading image.


Recommended Posts

  • 3 weeks later...

I'm getting the same error as well, it is in the AdminProducts file at

if (!$tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS') OR !move_uploaded_file($_FILES['image_product']['tmp_name'], $tmpName))
               $this->_errors[] = Tools::displayError('An error occured during the image upload');
           elseif (!imageResize($tmpName, _PS_IMG_DIR_.'p/'.$id_product.'-'.$id_image.'.jpg'))
               $this->_errors[] = Tools::displayError('an error occurred while copying image');



EDIT: In my case the error resulted in a full hdd.

Link to comment
Share on other sites

Just downloaded the latest version today and have this problem when trying to upload a product image.

1.An error occurred while copying image.

All folders had correct permission on install. How can this be fixed as I cannot add products without images?

Link to comment
Share on other sites

Same problem here.. I cant understand, or I CANT Believe that Presta Team is not reacting on it. I installed Presta 1.4 on server. Everything is fine, but the images were not adding to the products. Than i was trying all the functions in the backend related to images and sometimes images were adding and sometimes not.
Like this: I fill the product info, go to images tab > choose the image > click add image> and its not adding (gives mistake 1 error An error occurred while copying image. ) than i do the same on the same page with the same image and it will upload... that another will upload and next one will not... SO WIERD.... So, i decided to reinstall Presta , and now its not attaching any pictures. non 50X50 not 1000X300, i tryed all the sizes, all the resolutions and its not about it... Its about some settings...

48362_ye3setexpIt6IbTrvTlQ_t

Link to comment
Share on other sites

I also tried a re-install and no luck. Spoke with my host but they think it is something in the coding. Have reported it as a bug and am awaiting a fix. Hopefully today.

Also, another problem, in IE9, when you log in to the admin, there should be a video, but I don't see it. When I tried a product image upload via Firefox in case it was a browser problem, I could see a video when I logged into admin.

Link to comment
Share on other sites

Solved for me
Presta 1.43
Spent hours and hours and finally fixed!

When you insert lot of products on folder img/p the system creates inside there some subfolders like img/p/1 and so on. You have to chenge permitions to these subfolders and everything will be ok!

Link to comment
Share on other sites

Solved for me
Presta 1.43
Spent hours and hours and finally fixed!

When you insert lot of products on folder img/p the system creates inside there some subfolders like img/p/1 and so on. You have to chenge permitions to these subfolders and everything will be ok!


Change in what? I've tried serverall changes but nothing seemed to help
Now i've the directorie's = 755 and the files to 644; any other suggetions?
Link to comment
Share on other sites

Solved for me
Presta 1.43
Spent hours and hours and finally fixed!

When you insert lot of products on folder img/p the system creates inside there some subfolders like img/p/1 and so on. You have to chenge permitions to these subfolders and everything will be ok!


Change in what? I've tried serverall changes but nothing seemed to help
Now i've the directorie's = 755 and the files to 644; any other suggetions?


asked my host on the PHP settings as suggestd above, and it solved for me (Presta 1.4.3)
so: PHP Safe Mode set to OFF and the images are uploading OK.
Link to comment
Share on other sites

  • 1 month later...
  • 6 months later...
  • 1 year later...
  • 1 month later...

Where to I set PHP Safe Mode to off?  

I am having this problem too with uploading images.

 

Thanks in advance

I have the same problem.

 

Safe mode is off, on the same server older version of prestashop works, version 1.5.6.2 doesn't.

 

Any help would be appreciated

Link to comment
Share on other sites

I have the same problem.

 

Safe mode is off, on the same server older version of prestashop works, version 1.5.6.2 doesn't.

 

Any help would be appreciated

so, it appears that the simplest explanation is always the last one you check...

 

Although my site's folder was owned by www-data user and group, some subfolders of img folder where owned by another user.

 

Don't know how this could happen, but there you go...

 

It works now as it should .

Link to comment
Share on other sites

  • 2 months later...

Hi all,

 

I had this problem too, and I think that the solution is very simple. Check the image dimensions, if the width is larger than 5000px, reduce to no more than 5000px, and then try to upload the image again.

 
It helped me, maybe someone will help too.
Sorry for my english, hopefully understand what I wrote  :)
Link to comment
Share on other sites

×
×
  • Create New...