Magento front controller reached 100 router match iterations (fixed)

Magento front controller reached 100 router match iterations
Last updated on

I will tell you 5 solutions to fix the error “Front controller reached 100 router match iterations

If your Magento store is going down and you are facing an error that is “Front controller reached 100 router match iterations“. The problem occurs because your routers are making circular references for dispatching requests. One of them matches request, but doesn’t dispatch and pushes it to redispatch again (or no router matches request at all), because some of the routers disappearing from the configuration object, meaning there is no router available to match the request.

This error may cause by your cache is crashed/wrong (corrupted config cache of Magento) when you are moving your website to a new hosting/server that need to fflush/rebuild to new cache(the shared cache storage between multiple servers). When the routers configuration was loaded from cache and the cache was corrupted (this class: Mage_Core_Model_Cache).

Please try the following solutions to fix that error (step by step and stop when its fixed):

Solution 1 (clear old cache):

Deleting/var/cache and rename your current .htaccess file in the root directory for check if its fixed so that’s problem with mod_rewrite then we will need to enable it on Hosting/Server (Apache).

Solution 2 (CHMOD is not right):

Please go to location: app/code/core/Mage/Cms/controllers/ and set CHMOD 770 for file: IndexController.php

– Solution 3 (problem with cookies and 404 CMS page setup) :

Log into the Database that’s associated with your store and run the following SQL commands (you can back up table core_config_data if you’re carefully 🙂 ):

update `core_config_data` set `value` = 'cms/index/noRoute' where `path` = 'web/default/no_route';
update `core_config_data` set `value` = NULL where `path` = 'web/cookie/cookie_domain';
update `core_config_data` set `value` = 0 where `path` = 'web/cookie/cookie_httponly';

Solution 4 (disabling cache reports):

Please go to location: /app/code/core/Mage/Core/Model and open file: Config.php then find the function:

public function init($options=array())
{
    $this->setCacheChecksum(null);
    $this->_cacheLoadedSections = array();
    $this->setOptions($options);
    $this->loadBase();

    $cacheLoad = $this->loadModulesCache();
    if ($cacheLoad) {
        return $this;
    }
    $this->loadModules();
    $this->loadDb();
    $this->saveCache();
    return $this;
}

and replace them with:

public function init($options=array())
{
    $this->setCacheChecksum(null);
    $this->_cacheLoadedSections = array();
    $this->setOptions($options);
    $this->loadBase();

    $cacheLoad = $this->loadModulesCache();
    if ($cacheLoad) {
        return $this;
    }
    //line code fix
    $this->_useCache = false;
    $this->loadModules();
    $this->loadDb();
    $this->saveCache();
    return $this;
}

Or somehow (if you’re familiar with Phpmyadmin you can change this by parameter of it in table core_config_data) you can access Magento Admin Panel, you can go to: System – Configuration – General – Reports, in General tab please set “Enable Reports” section to No (see below screenshot):

Magento fixing error by enable reports

Solution 5 (clear/reload the whole Magento cache):

Download file in this article and upload it to root directory then run it by: http://yourdomain.com/name-of-file.php

P/s: please clear/delete cache if needed (var/cache). To do this please read this article.

I hope this will help. Leave your comment...

 




Post a Comment

Please keep in mind that all comments are read and moderation.
Your email address WILL NOT be published. Please DO NOT use keywords in the Real Name field. Thank you !




    2 Comments

  1. It’s actually a great and helpful piece of info. I am glad that you shared this useful information with us. Please keep us informed like this. Thanks for sharing.

    Reply

Get $100 Free from Vultr to accelerate your website and application Register a Domain Name on Namesilo


Categories