0
votes

I am making a Magento site that is currently in development. The sites filterable side bar was working fine and it would filter by attributes, categories, price and manufacturer however I've just cleared the cache and it has suddenly been replaced with the following error message:

Warning: include(Mage.php): failed to open stream: No such file or directory in /var/www/magento/lib/Varien/Autoload.php on line 93 Warning: include(): Failed opening 'Mage.php' for inclusion (include_path='/var/www/magento/app/code/local:/var/www/magento/app/code/community:/var/www/magento/app/code/core:/var/www/magento/lib:.:/usr/share/php:/usr/share/pear') in /var/www/magento/lib/Varien/Autoload.php on line 93

Error:

Fatal error: Class 'Mage' not found in /var/www/magento/app/code/core/Mage/Core/functions.php on line 244

The site is running on Magento Community 1.8.1 on an EC2 AWS Instance. No core files have been edited so I can't really understand why the message is pointing toward core files.

Any advice would be amazing! Thanks :)

EDIT: I've got the error trace from New Relic which goes into a little more detail:

 …eErrorHandler called at /var/www/magento/app/code/core/Mage/Core/
functions.php (244)
…rHandler called at /var/www/magento/app/code/core/Mage/Core/Block/
Template.php (241)
…etchView called at /var/www/magento/app/code/core/Mage/Core/Block/
Template.php (241)
…etchView called at /var/www/magento/app/code/core/Mage/Core/Block/
Template.php (272)
…nderView called at /var/www/magento/app/code/core/Mage/Core/Block/
Template.php (286)
…:_toHtml called at /var/www/magento/app/code/core/Mage/Core/Block/
Abstract.php (919)
…:toHtml called at /var/www/magento/app/code/core/Mage/Core/Block/Text/
List.php (43)
…:_toHtml called at /var/www/magento/app/code/core/Mage/Core/Block/
Abstract.php (919)
…::toHtml called at /var/www/magento/app/code/core/Mage/Core/Block/
Abstract.php (637)
…hildHtml called at /var/www/magento/app/code/core/Mage/Core/Block/
Abstract.php (581)
in Mage_Core_Block_Abstract::getChildHtml called at /var/www/magento/app/design/frontend/metrostore/default/template/page/category.phtml (58)
… include called at /var/www/magento/app/code/core/Mage/Core/Block/
Template.php (241)
…etchView called at /var/www/magento/app/code/core/Mage/Core/Block/
Template.php (272)
…nderView called at /var/www/magento/app/code/core/Mage/Core/Block/
Template.php (286)
…:_toHtml called at /var/www/magento/app/code/core/Mage/Core/Block/
Abstract.php (919)
…ct::toHtml called at /var/www/magento/app/code/core/Mage/Core/Model/
Layout.php (555)
…alled at /var/www/magento/app/code/core/Mage/Core/Controller/Varien/
Action.php (390)
…/www/magento/app/code/core/Mage/CatalogSearch/controllers/
ResultController.php (80)
…alled at /var/www/magento/app/code/core/Mage/Core/Controller/Varien/
Action.php (418)
…/var/www/magento/app/code/core/Mage/Core/Controller/Varien/Router/
Standard.php (250)
…called at /var/www/magento/app/code/core/Mage/Core/Controller/Varien/
Front.php (172)
…ont::dispatch called at /var/www/magento/app/code/core/Mage/Core/Model/
App.php (354)
in Mage_Core_Model_App::run called at /var/www/magento/app/Mage.php (684)
in Mage::run called at /var/www/magento/index.php (87)

Looks like it might be line 58 of category.phtml is this how it's supposed to look?

<?php if ($categorysidebar == 'left') { ?>
            <div class="category-left">
            <div class="col-main">
                <?php echo $this->getChildHtml('global_messages') ?>
                <?php echo $this->getChildHtml('content') ?>
            </div>
            <div class="col-left sidebar"><?php echo $this->getChildHtml('left') ?></div>
            </div>
            <?php } elseif ($categorysidebar == 'right') { ?>
                <div class="category-right">
            <div class="col-main">
                <?php echo $this->getChildHtml('global_messages') ?>
                <?php echo $this->getChildHtml('content') ?>
            </div>
            <div class="col-left sidebar"><?php echo $this->getChildHtml('left') ?></div>
            </div>
            <?php } elseif ($categorysidebar == 'full') { ?>

            <div class="category-full">
                <div class="col-left sidebar"><?php echo $this->getChildHtml('left') ?></div>
                <div class="col-main">
                    <?php echo $this->getChildHtml('global_messages') ?>
                    <?php echo $this->getChildHtml('content') ?>
                </div>
            </div>
1
go to the var/cache folder and remove all the cache and also clear your browser cache and check it again..Vishal Sharma
Hi, thanks for the advice. I removed all files and folders from /session and /cache but still no change. Any other ideas? Thanks :)Alexander

1 Answers

0
votes

Eventually found the solution. It was symlinks being allowed on the backend.

If you have the same issue just go to System > Configuration > Developer > Allow Symlinks

Just disable that option and hopefully it should help you too.