Magento Randomly Redirects to hostname/index.php/install – How to Fix

errormagento-1.9

My Magento website is acting strangely.

Here is what happen this morning when I tried to log in to the backend this morning. I opened up the homepage and everything came up fine. I went to the backend and got the login page. After logging in though I am redirected to the Magento's Installation Wizard page. I clear my cache and sessions under /var and the process repeats. It happens randomly now. For example, if I go my about us page it works fine, but then I go to contact us and it goes to the installation page.

Any ideas anybody?

My site is not live. The last thing I remember doing was importing products using Magmi and I adding a web reference to a visual studio project.

Error logs are turning up no results because the redirect is not considered an error.

It seems like my local.xml is readable, but at some point, during usage of my site it becomes unreadable and requires the session and cache to be cleared.

Update:

I believe I found the error message that triggered this bug.

[Mon Jul 21 16:19:12 2014] [error] [client 10.0.0.115] PHP Warning: SoapServer::SoapServer(): I/O warning : failed to load external entity "http://hostname.com/index.php/api/soap/index/?wsdl=1&wsdl%2F_vti_bin%2FListData_svc%2F%24metadata=" in /var/www/html/lib/Zend/Soap/Server.php on line 811

What I forgot to mention before is that I ran into this bug a few weeks ago. However, the bug managed to fix itself so I thought nothing of it. But I checked the error log from last week when this bug appeared and this is the error.

[Wed Jul 09 13:41:40 2014] [error] [client 10.0.1.33] PHP Warning: SoapServer::SoapServer(): I/O warning : failed to load external entity "http://hostname.com/index.php/api/index/index/?wsdl=1" in /var/www/html/lib/Zend/Soap/Server.php on line 811

Maybe this will help.

Udate

Found this on the forums.

http://www.magentocommerce.com/boards/forum/viewthread/512408/

Problem with this is I don't have an old cache folders or sessions

Best Answer

We had this problem and now have both a cause and a solution.

The error behavior (redirecting to the Magento install wizard after a sucessful upgrade) is not random. It occurs when the SOAP API URL is hit. In our case we had a scheduled process that hit the SOAP API periodically. so it would occur, then go away then reoccur.

After time the behavior goes away. To make it happen... Load yourAPI URL in a browser http://hostname.com/api/soap/?wsdl The magento admin and likely the front end store pages will throw the 404/install.php page.

The cause of the issue was a PHP bug https://bugs.php.net/bug.php?id=62577 and Magento was able to provide a patch PATCH_SUPEE-3762_EE_1.14.0.1_v1.sh We were running Redhat 6 with PHP 5.3.3 (but this still occurs in PHP 5.3.28)

Related Topic