Magento SOAP-ERROR: Parsing WSDL After Upgrade 1.9.1 to 1.9.2

Magento SOAP-ERROR: Parsing WSDL After Upgrade 1.9.1 to 1.9.2

最近将 Magento 从 1.9.1 更新到 1.9.2。

升级前,API 连接运行良好。 升级后,我们立即收到以下错误:

"SOAP-ERROR: Parsing WSDL: Couldn't load from 'example.com/index.php/api/?wsdl' : Start tag expected, '<' not found "

它可以从我们的浏览器中正常加载;就在我们的仓库尝试连接的时候,它 returns 这个错误。

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

由于服务器启用了 GZIP 而出现此问题。 我们顺利地禁用了 GZIP 和 API 运行。由于某种原因,启用 GZIP 时 SOAP 请求不会成功。

然而,由于我们希望为站点启用 GZIP,因此我们将以下代码添加到 .htaccess 文件中。这为 API 请求禁用了 GZIP,但为站点的其余部分启用了 GZIP。

# for URL paths that begin with "/index.php/api/"
SetEnvIf Request_URI ^/index.php/api/ no-gzip=1