i got a new SOAP Error Unknown Content-Encoding after updating php to 5.4
phpinfo(); at magento: HTTP_ACCEPT_ENCODING gzip,deflate,sdch
getLastRequestHeaders :
POST /index.php/api/soap/index/ HTTP/1.1
Host: www.abc.de
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.3.3-7+squeeze19
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:Mage_Api_Model_Server_HandlerAction"
Content-Length: 2592
SoapFault Object
(
[message:protected] => Unknown Content-Encoding
[string:Exception:private] =>
[code:protected] => 0
[file:protected] => /var/www/kusy/module/magentoapi/magento.class.php
[line:protected] => 158
[trace:Exception:private] => Array
(
[0] => Array
(
[function] => __doRequest
[class] => SoapClient
[type] => ->
[args] => Array
(
[0
** Update 15:02 **
i check the sample code from magento api website to create a product. this is the result:
__getLastRequestHeaders :
POST /index.php/api/soap/index/ HTTP/1.1
Host: www.abc.de
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.3.3-7+squeeze19
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:Mage_Api_Model_Server_HandlerAction"
Content-Length: 2552
__getLastResponseHeaders :
HTTP/1.1 200 OK
Date: Thu, 03 Jul 2014 13:01:18 GMT
Server: Apache/2.2.9 (Debian) PHP/5.4.30-1~dotdeb.0 mod_python/3.3.1 Python/2.5.2 mod_ruby/1.2.6 Ruby/1.8.7(2010-08-16) mod_ssl/2.2.9 OpenSSL/0.9.8o
X-Powered-By: PHP/5.4.30-1~dotdeb.0
Content-Encoding: none
Connection: close
Content-Length: 506
Content-Type: text/xml; charset=UTF-8
object(SoapFault)#2 (9) {
["message":protected]=>
string(24) "Unknown Content-Encoding"
["string":"Exception":private]=>
string(0) ""
["code":protected]=>
int(0)
I solve the Problem.
In php.ini
zlib.output_compression = On
And in php:
$client = new SoapClient($url, array('compression'=> SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,'trace'=>true,'exceptions'=>true));