October 24, 2020


Thinking Magento

Magento Suddenly Redirects To Installation Wizard

Redirecting to the Magento Installation Wizard is down to local.xml not being load correctly or even at all. If local.xml doesn't exist or isn't readable or contains errors, it will more than likely redirect you to the installation wizard, under the impression there is no existing installation.

Although this error to do with Soap has been patched in Magento, it's not always practical to upgrade to the most recent version, so I'm going to break down the error and what's going on.

In you var/report directory you will probably start seeing a huge increase in files with the following error "Front controller reached 100 router match iterations"

If your magento installation of years is suddenly redirecting to the Magento Installation Wizard and you can't get your site back without doing a php restart.

This problem is evident in php 5.3 - 5.5 and is caused by simplexml_load_string() and Zend.

The source of the problem is normally from a problem with Soap. Everytime the Soap URL is called on an installation that has external entity loading turned off by default (As it should be).

This triggers libxml_disable_entity_loader(true) and the local.xml file is no longer readable, so it redirects the customer to Magento Installation Wizard, because it doesn't detect that there is a valid install.

Things to do.

A) Test out your installation to see if you are vulnerable to this problem. Create the following file and run it in your browser.

Test script:


$xml = simplexml_load_file('foo');


Expected result:

Actual result:
    [0] => LibXMLError Object
            [level] => 1
            [code] => 1549
            [column] => 0
            [message] => failed to load external entity "foo"

            [file] => 
            [line] => 0


B) Download Magento Navigate to lib/Zend/Xml and lib/Zend/Soap

Upload lib/Zend/Xml to your server (This is a new directory, no overwritting required)
Upload lib/Zend/Soap/Server.php to your server (Overwrite the existing file)

C) (As a precaution) On your live server, download Mage.php in /app directory

Find public static function isInstalled 

Look for 
$localConfig = simplexml_load_file($localConfigFile);

Change it to the following

$localConfig = simplexml_load_file($localConfigFile); 

If this saved you hours of work or saved you from a headache, feel free to buy us a beer.





Installing patch SUPEE 6788 on a pre store causes this error for you. What to do you ask?

Download (No, I'm not going to say install it)

Upload app/bootstrap.php

and replace the index.php file with the one from (unless you've customised index.php) If you've customised it, add load app/bootstrap.php in index.php

All fixed... So what do you do now with all the money you've saved (beer buying time, see link above ;)