What a title huh? After writing JStore for my brother's sports memorabilia site I can appreciate the amount of work that goes into writing good e-commerce software. When I have time I like to browse around and see what other people are using, especially when it's feature laden and free. I have other motives but we'll talk about that in another article. One piece of e-commerce software I came across that seems to be very popular with on-line stores is Magento Community Edition. My hosting is with Fastwebhost and I have the Softaculous installer that had Magento as an option, so I decided to play with it a bit to see how easy it is to set-up and use.
Problems right from the start.
The install went without any issues using Softaculous but when I tried to load the home page (referred to as the Front-End in Magento) I had some errors pop up.
The PDO extension is required for this adapter but the extension is not loaded
#0 /home/offerme/public_html/mstore/lib/Zend/Db/Adapter/Abstract.php(247): Zend_Db_Adapter_Pdo_Abstract->setFetchMode(2)
#1 /home/offerme/public_html/mstore/app/code/core/Mage/Core/Model/Resource.php(165): Zend_Db_Adapter_Abstract->__construct(Array)
#2 /home/offerme/public_html/mstore/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#3 /home/offerme/public_html/mstore/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
#4 /home/offerme/public_html/mstore/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write')
#5 /home/offerme/public_html/mstore/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(335): Mage_Core_Model_Resource_Db_Abstract->_getWriteAdapter()
#6 /home/offerme/public_html/mstore/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(360): Mage_Core_Model_Resource_Db_Abstract->_getReadAdapter()
#7 /home/offerme/public_html/mstore/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php(134): Mage_Core_Model_Resource_Db_Abstract->getReadConnection()
#8 /home/offerme/public_html/mstore/app/code/core/Mage/Core/Model/Config.php(1348): Mage_Core_Model_Resource_Db_Collection_Abstract->__construct(Object(Mage_Core_Model_Resource_Website))
#9 /home/offerme/public_html/mstore/app/code/core/Mage/Core/Model/Config.php(1380): Mage_Core_Model_Config->getModelInstance('core_resource/w...', Object(Mage_Core_Model_Resource_Website))
#10 /home/offerme/public_html/mstore/app/Mage.php(490): Mage_Core_Model_Config->getResourceModelInstance('core/website_co...', Object(Mage_Core_Model_Resource_Website))
#11 /home/offerme/public_html/mstore/app/code/core/Mage/Core/Model/Abstract.php(208): Mage::getResourceModel('core/website_co...', Object(Mage_Core_Model_Resource_Website))
#12 /home/offerme/public_html/mstore/app/code/core/Mage/Core/Model/Abstract.php(213): Mage_Core_Model_Abstract->getResourceCollection()
#13 /home/offerme/public_html/mstore/app/code/core/Mage/Core/Model/App.php(608): Mage_Core_Model_Abstract->getCollection()
#14 /home/offerme/public_html/mstore/app/code/core/Mage/Core/Model/App.php(466): Mage_Core_Model_App->_initStores()
#15 /home/offerme/public_html/mstore/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Model_App->_initCurrentStore('', 'store')
#16 /home/offerme/public_html/mstore/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#17 /home/offerme/public_html/mstore/index.php(87): Mage::run('', 'store')
I looked around a fair bit and tried a few suggestions that I found on the net to no avail. So I turned to the support staff at Fastwebhost and they were able to make the necessary modifications to fix my issue very quickly. They didn't really tell me exactly what they did, I'm pretty sure they just added these settings to my php.ini file.
With that issue fixed I moved on to creating a test category and product item in the admin interface. When it came time to add images to the item I got the dreaded Upload HTTP Error in red when I hit the button to load them. After searching for quite some time for ways to resolve this error I finally came across a Magento plugin that replaces the out-of-box uploader. Apparently Magento uses Flash to upload the image files and for some reason it just won't work with the way Fastwebhost has my servers set-up. The plug-in is called the No Flash Image Uploader and will upload your images without using flash.
Installing the plugin
There is a good video on youtube that explains how to install a plugin in Magento (see below). The one problem I had was that the extension key they gave for this plug-in didnt work. The key off the website was magento-community/Dull_Uploader and when you put that into the Magento Connect Manager's you get the error:
Couldn't resolve host 'magento-community'
After another bit of searching I was able to find the Problems Installing No Flash Uploader in the Magento forums. The last message on the page said you need to use 'community' instead of 'magento-community' so changing the extension key to community/Dull_Uploader enabled me to install the plug-in just fine.
Now the image upload works fine without flash being involved.