Magento is gaining popularity in the ecommerce arena. The installation process is supposed to be painless and quick, still, there is a problem when installing Magento when you already have Zend Framework in your PHP include_path, which is the case in all our hosting accounts:

Magento comes with its own version of Zend Framework, and if you have ZF in your PHP include_path already, the installation will fail with a very strange error like:

[30-Jul-2009 18:05:02] PHP Fatal error:  Function __autoload(b514i6_xp_2pia3m5o191rxqn3) threw an exception of type ‘Exception’ in /var/www/vhosts/example.com/httpdocs/lib/Zend/Validate/Hostname.php on line 420

This error happens right after the database configuration screen, which in our case it showed incomplete and after entering the hostname it throws an error of a missing index db_prefix and a PHP fatal error like the one shown above.

In order to fix this problem, you need to remove the Zend Framework directory that’s outside of Magento from the include_path. In our servers, you can do this by adding the following line to httpdocs/.htaccess:

php_value include_path /var/www/vhosts/example.com/httpdocs

Make sure you replace example.com with your domain.

Once you make this modification, reload the database configuration screen and you will see the complete screen. The installation after this goes smoothly.