Error fetching http headers in SoapClient

前端 未结 15 1086
抹茶落季
抹茶落季 2020-12-08 18:50

I\'m trying to invoke a WS over https on a remote host:remote port and I get:

Error fetching http headers

using the PHP5 SoapCli

15条回答
  •  南笙
    南笙 (楼主)
    2020-12-08 19:16

    I had the same issue and tried the following by disabling keep_alive.

    $api_proxy = new SoapClient($api_url, array('trace' => true, 'keep_alive' => false));
    

    However, that didn't work for me. What worked worked for me was disabling the SOAP cache. It appears to have been caching the wrong requests and after disabling I actually noticed my requests were executing faster.

    On a linux server you can find this in your /etc/php.ini file.

    Look for soap.wsdl_cache_enabled=1 and change it to soap.wsdl_cache_enabled=0.

    Don't forget to reload apache. service httpd reload

提交回复
热议问题