简体   繁体   English

Magento SOAP-ERROR:从1.9.1升级到1.9.2后解析WSDL

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

Recently updated Magento from 1.9.1 to 1.9.2. Magento最近从1.9.1更新到1.9.2。

Before the upgrade the API connection was working great. 升级之前,API连接运行良好。 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 " “ SOAP错误:解析WSDL:无法从'example.com/index.php/api/?wsdl'加载:需要开始标记,找不到'<'”

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 PHP致命错误:SOAP错误:解析WSDL:无法从' http://example.com/index.php/api/v2_soap/index/?wsdl=1 '加载:预期开始标记,找不到'<'在第814行的/lib/Zend/Soap/Server.php中

The problem occurred due to the server having GZIP enabled. 发生此问题是由于服务器启用了GZIP。 We disabled GZIP and the API ran smoothly. 我们禁用了GZIP,并且该API顺利运行。 For some reason the SOAP request would not be successful when GZIP was enabled. 由于某些原因,启用GZIP时SOAP请求不会成功。

However as we wanted to have GZIP enabled for the site so we added the following code to .htaccess file. 但是,由于我们希望为站点启用GZIP,因此我们将以下代码添加到了.htaccess文件中。 This disabled GZIP for the API requests but kept GZIP enabled for the rest of the site. 这为API请求禁用了GZIP,但为网站的其余部分保持启用了GZIP。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM