3

I am getting the following error message:

Fatal error: Cannot override final method Mage_Core_Model_Abstract::clearInstance() in /var/www/html/app/code/core/Mage/Catalog/Model/Product.php on line 38 Warning: include(Mage.php): failed to open stream: No such file or directory in /var/www/html/lib/Varien/Autoload.php on line 93 Warning: include(): Failed opening 'Mage.php' for inclusion (include_path='/var/www/html/app/code/local:/var/www/html/app/code/community:/var/www/html/app/code/core:/var/www/html/lib:.:/usr/share/pear:/usr/share/php') in /var/www/html/lib/Varien/Autoload.php on line 93 Fatal error: Class 'Mage' not found in /var/www/html/app/code/core/Mage/Core/functions.php on line 244 Warning: include(Mage.php): failed to open stream: No such file or directory in /var/www/html/lib/Varien/Autoload.php on line 93 Warning: include(): Failed opening 'Mage.php' for inclusion (include_path='/var/www/html/app/code/local:/var/www/html/app/code/community:/var/www/html/app/code/core:/var/www/html/lib:.:/usr/share/pear:/usr/share/php') in /var/www/html/lib/Varien/Autoload.php on line 93 Fatal error: Class 'Mage' not found in /var/www/html/app/code/core/Mage/Core/Model/Resource/Session.php on line 108

Only the main page does not open anymore. If I open any product via direct URL or category it works! Magento Backend also works fine.

Does anybody have a clou? Google told me, that it could be a problem with APC Cache, but also with disabled APC it does not work.

Hope I can get some help here :-). Thanks!!

6
  • I'd start with the answer magento.stackexchange.com/questions/428/…, it walks through several troubleshooting steps. If that doesn't help, report back and we can take it from there. Also, did the error appear randomly or have you changed something recently that prompted it?
    – jesseconnr
    Feb 28, 2014 at 21:15
  • Hi thanks for your quick reply! The appeared randomly. I have not changed anything. Also I already did most of the steps mentioned in your link. I will do them again Feb 28, 2014 at 21:25
  • Everything I'm seeing on this issue points to some kind of modification. Similar issue here, magento.stackexchange.com/questions/1169/…
    – jesseconnr
    Feb 28, 2014 at 21:32
  • Also I found this error in nginx error log: 2014/02/28 22:35:46 [error] 1503#0: *2208 FastCGI sent in stderr: "PHP message: PHP Fatal error: Class 'Mage' not found in /var/www/html/app/code/core/Mage/Core/functions.php on line 244" while reading upstream, client: xx.xx.xx.xxx, server: www.xxx.de, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.xxx.de“ Feb 28, 2014 at 21:49
  • Is it possible that the site is just suffering under heavy load during crawlings from google and yandex? I looked into my access log and number of crawlings today... Feb 28, 2014 at 22:03

1 Answer 1

4

I think I fixed the issue by updating Magento to 1.8.0.1 and editing

app/code/core/Mage/Catalog/Block/Navigation.php line 254

from

$childrenCount = $children->count();

to

$childrenCount = count($children);

I can access the main page without any error message now!

1
  • If that line actually had > in it then something caused it to be converted. It should have simply been ->count()
    – jesseconnr
    Mar 10, 2014 at 17:44

Your Answer

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

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