简体   繁体   English

nusoap 错误:HTTP 错误:标头的套接字读取超时

[英]nusoap error : HTTP Error: socket read of headers timed out

i need a help我需要帮助

i have a problem in using nusoap for PHP when client want to access service in server当客户端想要访问服务器中的服务时,我在为 PHP 使用 nusoap 时遇到问题

the error is :错误是:

HTTP Error: socket read of headers timed out

this is my XML can be accessed at [http://sobath-market.com/index.wsdl.php?wsdl][1]这是我的 XML 可以访问[http://sobath-market.com/index.wsdl.php?wsdl][1]

can someone help me??有人能帮我吗??

thanks谢谢

Hi this error often occurs for a new user who using nusoap , as the default response time has been to 30 seconds.嗨,这个错误经常发生在使用 nusoap 的新用户身上,因为默认响应时间是 30 秒。 As of your request exceeds more than this execution time, you are getting this error, to fix this issue change the following code in "nusoap.php" in your nusoap library当您的请求超过此执行时间时,您会收到此错误,要解决此问题,请更改 nusoap 库中“nusoap.php”中的以下代码

socket_set_timeout( $this->fp, $response_timeout);

to

socket_set_timeout( $this->fp, 200);

i hope you got the expected solution from this.我希望你能从中得到预期的解决方案。

Instead of changing the "nusoap.php" file you can call the constructor passing the timeout as a parameter.您可以调用构造函数,将超时作为参数传递,而不是更改“nusoap.php”文件。

$client = new nusoap_client(
    /*endpoint*/ $url,
    /*wsdl*/ $type,
    /*proxyhost*/ false,
    /*proxyport*/ false,
    /*proxyusername*/ false,
    /*proxypassword*/ false,
    /*timeout*/ $timeout, //here you can define timeout
    /*response_timeout*/ $responseTimeout, //here is what you want to define
    /*portName*/ '');

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

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