It's a fresh 1.9 installation. I'm new, so I was following some guides which turned out to be outdated, and so I used Mysql4 classes instead of Resource.

I changed the extensions from Mage_Core_Model_Mysql4_Abstract to Mage_Core_Model_Resource_Db_Abstract, and they worked perfectly.

I then tried to change the name of the model/resource folder from Mysql4 to Resource.

I changed its name in the config.xml from <class>Foo_Foobar_Model_Mysql4</class> to <class>Foo_Foobar_Model_Resource</class>, and the class names of the resources from

class Foo_Foobar_Model_Mysql4_Example To class Foo_Foobar_Model_Resource_Example.

But for some reason, the last two steps broke the module, and I started getting:

Warning: include(/var/www/html/magento/includes/src/Foo_Foobar_Model_Resource_Example.php): failed to open stream: No such file or directory in /var/www/html/magento/includes/src/Varien_Autoload.php on line 94

Even though the class is right there.. I tried checking the permissions and owners of the files on the server, and they're exactly the same in both cases.. What is the cause for this weird error.. Everything is the same except the folder name..

  • You need to disable the compilation and reenable it again.
    – Marius
    Mar 11, 2015 at 9:08
  • I tried that.. The module is just giving a blank page now..
    – Pat
    Mar 11, 2015 at 9:19
  • Or click rebuild compilation
    – Jeroen
    Mar 11, 2015 at 11:05
  • Yes, I had to clear the compilation and now it works great. Thank you! If you want post it as an answer so I can select a right answer.
    – Pat
    Mar 11, 2015 at 11:11

1 Answer 1


Disable or rebuild compilation.

Thanks to Marius too!

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.