Magento Woes (Zend Framework)

As Magento software gets more popular, we’re increasingly running into people who are experiencing errors with our setup. A majority of these are addon issues from Magento Connect and have been addressed via their forums / knowledge base – though we’ve had one that took us a moment to figure out.

Fatal error: Function __autoload(b514i6_xp_2pia3m5o191rxqn3) threw an exception of type ‘Exception’ in /home/<user>/public_html/magento/lib/Zend/Validate/Hostname.php on line 420

Long story short – this is because we include the Zend Framework on our include path for everyone to utilize freely – the issue is Magento also bundles Zend Framework locally since they rely on it as well. They likely do this to maintain a stable version across all platforms – and possibly slightly modified it (not confirmed). As a result people trying to install Magento on our machines were getting that obscure error.

To fix it it’s quite simple – change the default include path to your home directory (put this in the .htaccess fileย  in your public_html/ folder):

php_value include_path /home/<yourusername>

Hopefully this solves some issues people have with a similar setup as ours.


This entry was posted in General and tagged , , . Bookmark the permalink.

3 Responses to Magento Woes (Zend Framework)

  1. till says:

    This is an ongoing issue, and it would be simple for the Magento folks to fix. I remember I had a similar issue in an early 0.x version of Magento and even reported it somewhere, but it looks like there is no fix.

    Anyway, instead of appending the include_path, when the shop is initialized, they need to prepend to the current path. The include path is always search from left to right, e.g. .:/foo:/bar — then the current directory (aka “.”) is first, then /foo, before /bar.

    So If Magento would be “first” there would be less issues with the environment.

    Regardless of the above, the default include_path should be:
    php_value include_path .:/home/

    ๐Ÿ™‚ Though it probably doesn’t matter since Magento adds its own jist anyway. But some of your own scripts might fail if you forget the “.”.

  2. Definitely good information – it is nice to see that you include the Zend Framework ๐Ÿ™‚

  3. Cody says:

    @till – That was an oversight on my part – I’ll make sure to update the post shortly with relevant information. Typically the people running into this issue the above is fine, though you’re right depending on what scripts they’re running.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.