Recently updated Magento from 1.9.1 to 1.9.2.
Before the upgrade the API connection was working great. As soon as we have upgraded, we now get the following error:
"SOAP-ERROR: Parsing WSDL: Couldn't load from 'example.com/index.php/api/?wsdl' : Start tag expected, '<' not found "
It loads fine from our browser; just when our warehouse is trying to connect, it returns this error.
PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://example.com/index.php/api/v2_soap/index/?wsdl=1' : Start tag expected, '<' not found in /lib/Zend/Soap/Server.php on line 814
The problem occurred due to the server having GZIP enabled. We disabled GZIP and the API ran smoothly. For some reason the SOAP request would not be successful when GZIP was enabled.
However as we wanted to have GZIP enabled for the site so we added the following code to .htaccess file. This disabled GZIP for the API requests but kept GZIP enabled for the rest of the site.
# for URL paths that begin with "/index.php/api/"
SetEnvIf Request_URI ^/index.php/api/ no-gzip=1