user1877095
user1877095

Reputation: 75

Magento - Error while uploading images

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.

Upvotes: 5

Views: 10321

Answers (3)

MagePal Extensions
MagePal Extensions

Reputation: 17656

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

Upvotes: 2

Fiasco Labs
Fiasco Labs

Reputation: 6457

If you're going to use self-signed certificates, then you must set yourself up as a CA and import the key for that into your browsers. At this point, your certificates are now valid security certificates attached to a trusted CA. You then have a fully functional secured site which allows you to test out all functions of Magento as they would work on your live e-commerce server. The Flash Uploader will quit whining about it as well.

Create some nice new 10 year certificates and install them. The procedure is fairly easy.

Start at (1B) Generate your own CA (Certificate Authority) on this web page: Creating Certificate Authorities and self-signed SSL certificates and generate your CA Certificate and Key. Once you have these, generate your Server Certificate and Key. Create a Certificate Signing Request (CSR) and then sign the Server Key with the CA Certificate. Now install your Server Certificate and Key on the web server as usual, and import the CA Certificate into Internet Explorer's Trusted Root Certification Authority Store (used by the Flex uploader and Chrome as well) and into Firefox's Certificate Manager Authorities Store on each workstation that needs to access the server using the self-signed, CA-signed server key/certificate pair.

You now should not see any warning about using self-signed Certificates as the browsers will find the CA certificate in the Trust Store and verify the server key has been signed by this trusted certificate. Also in e-commerce applications like Magento, the Flex image uploader will now function in Firefox without the dreaded "Self-signed certificate" error message.

Upvotes: 0

clockworkgeek
clockworkgeek

Reputation: 37700

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.

Upvotes: 3

Related Questions