Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento - Error while uploading images

Tags:

magento

I am not able to upload an image to a product in magento,i.e,I am unable to add a product image. When I try to upload large images(about 600kb) ,it says

SSL Error: Invalid or self-signed certificate

When I try to upload small images (abut 3 kb),it says

Upload HTTP Error

I do need help urgently.Please please help me. Thanks a lot.

Additionally: I run magento using xampp, in Ubuntu.

like image 746
user1877095 Avatar asked Dec 09 '12 08:12

user1877095


2 Answers

In the past I've encountered upload issues with SSL when the config is badly set. Go to System > Configuration > Web > Secure and double check what you have set there.

  • Base URL Typically the same as in the Unsecure section but with https: instead of http:
  • Base Link URL {{secure_base_url}}
  • Base Skin URL {{secure_base_url}}skin/
  • Base Media URL {{secure_base_url}}media/
  • Base JavaScript URL {{secure_base_url}}js/

If those URLs differ then the flash-based uploader has security problems. Sometimes the URLs cannot use {{secure_base_url}} - perhaps for a CDN - and so the way to get around it is with No Flash Image Uploader extension.

like image 119
clockworkgeek Avatar answered Oct 29 '22 16:10

clockworkgeek


Assuming that you are using a self-signed certificate (and NOT using htaccess to password protect the site) then

Magento product upload normally have issue with self-signed certificate, so to get around this you can turn off ssl by setting use secure url in admin to false or just enter the unsecure (regular) web site URL (in Admin -> System -> Config -> Web -> Secure)

If you are sill have issue with file size then take a look at you php.ini values for

upload_max_filesize = 64M
post_max_size = 96M

You could also install the self-signed certificate as a Trusted Root CA

like image 30
Renon Stewart Avatar answered Oct 29 '22 15:10

Renon Stewart