I spent the last two days debugging a problem that caused my site to randomly redirect to the index.php/install page. I solved the problem by clearing the cache and the sessions folder, and then rebooting the server. I found the event that triggered the bug. The problem occurs when I try to add a service reference in MS visual studio 2012 using the following links.
http://magentohost/api/?wsdl
http://magentohost/api/soap/?wsdl
Using these two URLS cause the following error in the error log.
[Thu Jul 24 08:20:40 2014] [error] [client 10.0.0.115] PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://hostname.com/index.php/api/soap/index/?wsdl=1&wsdl%2F_vti_bin%2FListData_svc%2F%24metadata=' : failed to load external entity "http://hostname.com/index.php/api/soap/index/?wsdl=1&wsdl%2F_vti_bin%2FListData_svc%2F%24metadata="\n in /var/www/html/lib/Zend/Soap/Server.php on line 811
[Thu Jul 24 08:20:46 2014] [error] [client 10.0.0.115] PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't find <definitions> in 'http://hostname.com/index.php/api/soap/index/?wsdl=1&wsdl%2Fmex=' in /var/www/html/lib/Zend/Soap/Server.php on line 811
Here is line 811 of Server.php
$server = new SoapServer($this->_wsdl, $options);
I tried connecting to those URLS on CE version 1.8.0 alpha and they worked fine.
I just recently upgraded from version 1.8.0 alpha to 1.9.0.1.
The following URL doesn't cause a problem in CE version 1.9.0
http://magentohost/api/v2_soap?wsdl=1
Does anyone know if this is a bug in CE version 1.9.0.1 or is it an error in my upgrade?
Can you not connect to soap v1 with visual studio 2012?
Best Answer
This is an already known and patched Magento Bug.
http://www.magentocommerce.com/knowledge-base/entry/ce19-later-release-notes#ce19-patches-soap
You can get the patch file (SUPEE-3762) from the download page: SUPEE-3762 - Prevents repeated SOAP index page call issue from causing customers to only see the Magento installation page - Added Aug 12, 2014 http://www.magentocommerce.com/download