I am on Magento CE - I've successfully installed the sample data as well. I have no issues on my Mac OS X Yosemite however, on my AWS Ubuntu instance, I am getting the following error:

PHP Fatal error:  Call to a member function getBaseMediaPath() on a non-object in /var/www/foobar/app/code/core/Mage/Catalog/Model/Product/Image.php on line 270

Also trying to view the same product in the admin gives me:

PHP Fatal error:  Call to a member function getConfig() on a non-object in /var/www/foobar/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php on line 50

I have PHP GD installed and enabled. The var folder and media folders are set to 777.

All caches have been flushed & disabled, all indexes have been re-indexed.

EDIT: I've just turned on System & Exceptions logging. system.log shows:

2014-12-22T13:38:10+00:00 ERR (3): Warning: include(Mage/Catalog/Model/Product/Media/Config.php): failed to open stream: No such file or directory  in /var/www/foobar/lib/Varien/Autoload.php on line 94
2014-12-22T13:38:10+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Catalog/Model/Product/Media/Config.php' for inclusion (include_path='/var/www/foobar/app/code/local:/var/www/foobar/app/code/community:/var/www/foobar/app/code/core:/var/www/foobar/lib:.:/usr/share/php:/usr/share/pear')  in /var/www/foobar/lib/Varien/Autoload.php on line 94
  • I guess this has to do with permission. Do a chmod -R 777 * in your Magento root folder and this will probably be solved.
    – Niels
    Dec 22, 2014 at 14:44

1 Answer 1


It turns out that the .gitignore file that I found off the net and used was not properly structured. Many directories and files were missing. The fix was to re-download and extract into my Magento directory. Hope this can help someone.

  • Which one was that? Many agencies use gitignore files that only include directories that you're allowed to modify (and not the core code - no point in having it in Git because you're not allowed to change it anyway).
    – Erfan
    Dec 23, 2014 at 1:47
  • @Erfan that's true, but this one wasn't designed well. Dec 23, 2014 at 1:49
  • Ah right. If you're still looking there's also this one: gist.github.com/erfanimani/8856964
    – Erfan
    Dec 23, 2014 at 1:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.