How to Install Extensions in Magento – Beware of Magento Compilations

This is a guest post by Nathan Strauss. If you want to guest post on this blog, check out the guest post guidelines.

Magneto is an open source web technology that facilitates the development of intuitive and user friendly websites that perform. With increasing popularity of Magento in the web development space today, several companies have emerged, offering professional Magento development, configuration, implementation, and integration services that facilitates developing websites that perform and generates revenues on the long term. Magneto e-commerce features high flexibility and advanced set of features and functionalities that are particularly designed to offer extendibility and versatility. With Magento, professional developers help you build the best online shopping cart that specifically suits your business objectives.


However, this blog addresses the common mistakes or complaints pertaining to installing extensions to Magento. There are several Magento extensions offered by different companies, and installing these may come up with errors or other common mistakes. Fortunately, there are solutions to cope with the errors in installing extensions to Magento. At the same time, beware of the common Magento compilations, which are the source of possible errors and issues in extension installation.

The Errors
Two common errors that you face at the time of installing extensions to Magento via the auto-load mechanism are:

Fatal error: Class ‘Activo_Adwordsconversion_Helper_Data’ not found in /home//public_html/app/Mage.php on line 516

PHP Fatal error: Call to a member function toOptionArray() on a non-object in /var/www/includes/src/Mage_Adminhtml_Block_System_Config_Form.php on line 421

It is important to note here that both the errors may occur after you have successfully installed the extension via Magento Connect Manager and trying to access the System>Configuration area. It is also noted that both the errors highlight the same symptoms, i.e. the classes are not found properly via the Magento Autoloader. These two are the most common errors that may arise during installing extensions to Magento e-commerce website development tool. The problem is with Magento compilation, and it is important to beware of it every time you install a new extension to your Magento component.

The Solution
Mostly, such errors in Magento extension installation arises when websites are hosted in small environments, perhaps a semi-dedicated shared or VMs environment. This results into poor performance, which leads to Magento compilation. This will not occur if the sites are hosted in a nice environment, with Alternative PHP Caching or other Opt Code Caching mechanism for PHP. The best way to resolve the errors and issues with Magento compilation is to recompile.

Recompile Magento
The ideal way to cope up with the errors in extension installation is to recompile Magento. Since the major problem stems out of Magento compilation, the best way to resolve it is to recompile.
There are two different ways to achieve Magento recompilation. The first way is to go through admin panel> System> Tools> Compilation, and then hit ‘Run Compilation Process’ button.

Another way to go via the command line, as mention herewith:

php -f shell/compiler.php — disable
php -f shell/compiler.php — clear
php -f shell/compiler.php – state

It goes without saying that you have to undergo several SSH access permissions to run and execute PHP, but at the end, it facilitates Magento recompilation, helping to avoid errors in extension installation.

Author Bio:
This post is contributed by Nathan Strauss, who is the marketing head in a magento development company providing magento development services and facilitates clients to hire magento developers as per their requirement.