PHP SoapClient的超时 [英] PHP SoapClient times out

查看:208
本文介绍了PHP SoapClient的超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打电话给SOAP客户端从同一个服务器,我上运行的服务进行测试。我WSDL是: http://www.installittoday.com/api/server.php? 我想简单地加载它WSDL:

I'm trying to call a Soap Client for testing purposes from the same server that I'm running the service on. My WSDL is at: http://www.installittoday.com/api/server.php?wsdl I'm trying to load it simply with:


    $client = new SoapClient('http://www.installittoday.com/api/server.php?wsdl');

但我找回错误:



Warning: SoapClient::SoapClient(http://www.installittoday.com/api/server.php?wsdl) [soapclient.soapclient]: failed to open stream: Connection timed out in /home/installi/public_html/api/client.php on line 4  

Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning : failed to load external entity "http://www.installittoday.com/api/server.php?wsdl" in /home/installi/public_html/api/client.php on line 4  

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.installittoday.com/api/server.php?wsdl' : failed to load external entity "http://www.installittoday.com/api/server.php?wsdl" in /home/installi/public_html/api/client.php:4 Stack trace: #0 /home/installi/public_html/api/client.php(4): SoapClient->SoapClient('http://www.inst...') #1 {main} thrown in /home/installi/public_html/api/client.php on line 4

不过,我可以设置客户端从我的其他网站就好了。这是一个防火墙问题还是什么?

Yet I can set up the client just fine from another site of mine. Is this a firewall issue or what?

推荐答案

确认这些扩展中启用了您的的php.ini

Make sure these extensions are enabled in your php.ini

extension=php_curl.dll 
extension=php_openssl.dll 
extension=php_soap.dll

这篇关于PHP SoapClient的超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆