Magento, in case you are not familiar, is a powerful development framework for e-commerce websites. There are a TON of corporate websites that are built on Magento such as Nixon, Toms, and a variety of other massive, international online stores. On paper, Magento sounds amazing. It is a rather robust online store development framework and will allow some people who do not have programming knowledge to actually make a website that has dynamic content and has functionality outside of being “just a brochure website.”
As someone who builds e-commerce websites, online stores and shopping carts from scratch, I find Magento (along with most other development frameworks) to be kind of a pain. That doesn’t mean I don’t use it. If the technical and design specifications for an e-commerce website aren’t particularly demanding, using Magento can save LOTS of time (although Magento loading times are prehistorically slow).
The main thing about Magento that is annoying is the fact that you can get blindsided by incredibly random errors and problems that are a nightmare to debug since there are just so many potential places in the framework where workflow can get backed up.
Most recently, I came across one such bug while *attempting* to upload photos to the Magento Product Catalog–namely that it was simply not possible. Upon trying to perform a very simple image upload, Magento returned a “Upload HTTP error” with no other information as to how such an error could occur. After doing a little digging, I was able to find out how to remedy the problem.
SOLUTION: If you get an “Upload HTTP error” when trying to upload images through the Magento Backend, chances are that you are using an .htaccess / .htpasswd password protection system for development purposes. While developing, you will have to turn off the .htpasswd protection in order to perform the simple task of uploading an image. Before doing an upload, just modify your .htaccess file and comment out all lines pertaining to the .htpasswd password protection. Commenting lines out of an .htaccess file can be done by putting the number sign (#) at the beginning of each line you want to comment out.
Why does this seemingly ridiculous bug exist? There is really no logical explanation for this that I have found. Personally, it seems to me that the nice folks at Magento Commerce throw in bugs like this and other proprietary nonsense so that novice developers get so frustrated that have to fork out the cash to enjoy the benefits of Magento’s paid services (even though they ironically tout the fact that they are “open source”).
Frustrating, yes. But being on top of crazy anomalies such as this is simply part of being a Magento Developer. Hopefully this mini-guide will save you some debugging time!