4

I've made a change to App.php in /app/local/Mage/Core/Model to test something, but now when removing the file the, the site gives a fatal error! - I've cleard the cache files but didn't help?

Warning: include(/var/www/site.com/public_html/app/code/local/Mage/Core/Model/App.php): failed to open stream: No such file or directory in /var/www/site.com/public_html/lib/Varien/Autoload.php on line 93
Warning: include(): Failed opening 'Mage/Core/Model/App.php' for inclusion (include_path='/var/www/site.com/public_html/app/code/local:/var/www/site.com/public_html/app/code/community:/var/www/site.com/public_html/app/code/core:/var/www/site.com/public_html/lib:.:/usr/share/php:/usr/share/pear') in /var/www/site.com/public_html/lib/Varien/Autoload.php on line 93
Fatal error: Class 'Mage_Core_Model_App' not found in /var/www/site.com/public_html/app/Mage.php on line 633
  • You can change the core files for testing purposes. Especially if the core is under version control you can just revert the files. But be careful, don't commit them :) – Fabian Blechschmidt Aug 26 '13 at 11:07
6

Here are a couple of things to try:

  • Manually delete the var/cache folder contents.
  • Check you don't have compilation enabled
  • Check that you don't have APC enabled
  • Check the App.php still exists under app/code/core/Mage/Core/Model and that you didn't accidentally changed the content.

From your error log:

Warning: include(): Failed opening 'Mage/Core/Model/App.php' for inclusion (include_path='/var/www/site.com/public_html/app/code/local:/var/www/site.com/public_html/app/code/community:/var/www/site.com/public_html/app/code/core:/var/www/site.com/public_html/lib:.:/usr/share/php:/usr/share/pear') in /var/www/site.com/public_html/lib/Varien/Autoload.php on line 93

Magento is telling you that it can't find the App Model in any of the code pools, most likely something happend to the original App.php file

  • I like your answer better than mine. It covers more error sources. :) +1. – Marius Aug 26 '13 at 10:38
  • The original file is still in it's correct position, just checked :) I've tried to remove the var/cache folder and no luck. Compiler is disabled and the includes folder is deleted. I don't think the server is using APC, can I check this? – Thomas Nielsen Aug 26 '13 at 10:52
  • I tried changing the local/core file, and hench forth came another error, but this time it told me some old fpc extension was enabled, so I messed around some files and found an fpc xml file in the /etc/ folder, renamed it to .sample, and then it worked! - for now :) – Thomas Nielsen Aug 26 '13 at 11:02
  • Interesting, glad to hear is working now – Allan MacGregor Aug 26 '13 at 11:25
3

Make sure the original file App.php exists in app/code/core/Mage/Core/Model. Also if you have compilation enabled disabled it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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