pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

<legend id='QKwUd'><style id='QKwUd'><dir id='QKwUd'><q id='QKwUd'></q></dir></style></legend>

    <small id='QKwUd'></small><noframes id='QKwUd'>

    <i id='QKwUd'><tr id='QKwUd'><dt id='QKwUd'><q id='QKwUd'><span id='QKwUd'><b id='QKwUd'><form id='QKwUd'><ins id='QKwUd'></ins><ul id='QKwUd'></ul><sub id='QKwUd'></sub></form><legend id='QKwUd'></legend><bdo id='QKwUd'><pre id='QKwUd'><center id='QKwUd'></center></pre></bdo></b><th id='QKwUd'></th></span></q></dt></tr></i><div class="5xzxhdf" id='QKwUd'><tfoot id='QKwUd'></tfoot><dl id='QKwUd'><fieldset id='QKwUd'></fieldset></dl></div>
        • <bdo id='QKwUd'></bdo><ul id='QKwUd'></ul>
        <tfoot id='QKwUd'></tfoot>

        PHP SoapClient:SoapFault 異常無法連接到主機

        PHP SoapClient: SoapFault exception Could not connect to host(PHP SoapClient:SoapFault 異常無法連接到主機)

        <small id='uJfGW'></small><noframes id='uJfGW'>

          <tbody id='uJfGW'></tbody>

        • <bdo id='uJfGW'></bdo><ul id='uJfGW'></ul>
          <i id='uJfGW'><tr id='uJfGW'><dt id='uJfGW'><q id='uJfGW'><span id='uJfGW'><b id='uJfGW'><form id='uJfGW'><ins id='uJfGW'></ins><ul id='uJfGW'></ul><sub id='uJfGW'></sub></form><legend id='uJfGW'></legend><bdo id='uJfGW'><pre id='uJfGW'><center id='uJfGW'></center></pre></bdo></b><th id='uJfGW'></th></span></q></dt></tr></i><div class="xdbj7zf" id='uJfGW'><tfoot id='uJfGW'></tfoot><dl id='uJfGW'><fieldset id='uJfGW'></fieldset></dl></div>

              <legend id='uJfGW'><style id='uJfGW'><dir id='uJfGW'><q id='uJfGW'></q></dir></style></legend>
                <tfoot id='uJfGW'></tfoot>

                  本文介紹了PHP SoapClient:SoapFault 異常無法連接到主機的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  使用此代碼我發出肥皂請求

                  using this code I make soap requests

                  $client = new SoapClient('http://example.com/soap/wsdl');
                  
                  try {
                      $result = $client->myMethod();
                  } catch (Exception $e) {
                      echo $e->getMessage();
                  }
                  

                  有時(十分之一),會引發異常:

                  Sometimes (once out of ten), an exception is raised:

                  SoapFault 異常:[HTTP] 無法連接到主機

                  SoapFault exception: [HTTP] Could not connect to host

                  我的嘗試

                  1) 我尋找解決方案,我讀到這個問題可能是由 wsdl 緩存引起的,我在 php.ini 中禁用了它:

                  1) I looked for solutions, and I read that this problem can be caused by wsdl cache, I disabled it in php.ini:

                  soap.wsdl_cache_enabled = 0
                  soap.wsdl_cache_ttl = 0
                  

                  引發更少的異常

                  2) 我試圖將 windows/system32/drivers/etc/hosts 中 dns 的分辨率添加到 windows 主機(它們在 windows 上):

                  2) I tried to add to the host of windows (they are on windows) the resolution of the dns in windows/system32/drivers/etc/hosts:

                  160.XX.XXX.XX example.com
                  

                  引發更少的異常

                  3) 我也嘗試禁用Windows 防火墻",

                  3) I also tried to disable "Windows Firewall",

                  引發更少的異常

                  4) 我也嘗試增加 php.ini 中的 default_socket_timeout

                  4) I also tried to increase the default_socket_timeout in php.ini

                  default_socket_timeout = 90
                  

                  什么都沒有改變

                  問題

                  服務器soap似乎沒有問題.從其他站點也可以正常使用.還有什么我可以做的嗎?

                  The server soap does not seem to have problems.It is used without problems also from other sites. Is there anything else I can do?

                  我的設置

                  PHP 5.6

                  阿帕奇 2.4

                  Windows Server 2012

                  Windows Server 2012

                  更新

                  經過多次測試,我認為問題出在網絡上,soap server后面有一個反向代理,問題出現在代理上.

                  After many tests, I think that the problem is in the network, soap server is behind a reverse proxy, the problem appears in the proxy.

                  推薦答案

                  您需要進一步改進調試工作:

                  You need to improve your debugging efforts even further:

                  ad 1) WSDL 變化很大嗎?如果沒有,打開 WSDL 緩存.您無需連接到服務器即可獲取 WSDL 文件.

                  ad 1) Does the WSDL change a lot? If not, turn on WSDL caching. You don't need to connect to the server to fetch the WSDL file.

                  你提到的輸出真的是在 echo $e->getMessage(); 中創建的嗎?您可以在 catch() 塊中添加一些調試代碼,例如:

                  Is the output you mentioned really created in echo $e->getMessage();? You could add some debugging code inside the catch() block, for example:

                  • 檢查您是否可以通過其他方式連接到服務器(例如 file_get_contents($soap_url))
                  • 如果沒有,請檢查您遇到的錯誤類型
                    • 打印時間并檢查 SOAP 服務器上的錯誤日志
                    • 一個 403 Forbidden 或類似服務器上的問題的錯誤點
                    • 無法連接錯誤指向網絡問題(并非唯一,但這種情況的可能性更高)
                    • check if you can connect to the server in another way (for example file_get_contents($soap_url))
                    • if not, check what kind of error you are getting
                      • print the time and check the error logs on the SOAP server
                      • a 403 Forbidden or similar error points on a problem on the server
                      • a Could not connect error points to a network problem (not exclusively but chances are higher for that)

                      總而言之,有時錯誤"很難調試,因此您要么應該嘗試使其可重現(這將指向問題),要么您需要記錄和輸出盡可能多的數據,以便您可以查看問題發生時的位置.

                      All in all, "sometimes errors" are hard to debug, so either you should try to make it reproducible (which will point at the problem), or you need to record and output as much data as possible so that you can see where the problem was at the time when it occurred.

                      這篇關于PHP SoapClient:SoapFault 異常無法連接到主機的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                      【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  enable SOAP on PHP(在 PHP 上啟用 SOAP)
                  Get received XML from PHP SOAP Server(從 PHP SOAP 服務器獲取接收到的 XML)
                  not a valid AllXsd value(不是有效的 AllXsd 值)
                  Implementation of P_SHA1 algorithm in PHP(PHP中P_SHA1算法的實現)
                  Sending a byte array from PHP to WCF(將字節數組從 PHP 發送到 WCF)
                  SoapClient error fallback in PHP(PHP 中的 SoapClient 錯誤回退)
                    <i id='KaW9y'><tr id='KaW9y'><dt id='KaW9y'><q id='KaW9y'><span id='KaW9y'><b id='KaW9y'><form id='KaW9y'><ins id='KaW9y'></ins><ul id='KaW9y'></ul><sub id='KaW9y'></sub></form><legend id='KaW9y'></legend><bdo id='KaW9y'><pre id='KaW9y'><center id='KaW9y'></center></pre></bdo></b><th id='KaW9y'></th></span></q></dt></tr></i><div class="lbjh55r" id='KaW9y'><tfoot id='KaW9y'></tfoot><dl id='KaW9y'><fieldset id='KaW9y'></fieldset></dl></div>

                            <tbody id='KaW9y'></tbody>
                          <tfoot id='KaW9y'></tfoot><legend id='KaW9y'><style id='KaW9y'><dir id='KaW9y'><q id='KaW9y'></q></dir></style></legend>
                        • <small id='KaW9y'></small><noframes id='KaW9y'>

                            <bdo id='KaW9y'></bdo><ul id='KaW9y'></ul>
                          • 主站蜘蛛池模板: 高尔夫球杆_高尔夫果岭_高尔夫用品-深圳市新高品体育用品有限公司 | 耐破强度测试仪-纸箱破裂强度试验机-济南三泉中石单品站 | 无菌检查集菌仪,微生物限度仪器-苏州长留仪器百科 | 洛阳永磁工业大吊扇研发生产-工厂通风降温解决方案提供商-中实洛阳环境科技有限公司 | YAGEO国巨电容|贴片电阻|电容价格|三星代理商-深圳市巨优电子有限公司 | 高博医疗集团上海阿特蒙医院 | 电地暖-电采暖-发热膜-石墨烯电热膜品牌加盟-暖季地暖厂家 | 书法培训-高考书法艺考培训班-山东艺霖书法培训凭实力挺进央美 | 武汉印刷厂-不干胶标签印刷厂-武汉不干胶印刷-武汉标签印刷厂-武汉标签制作 - 善进特种标签印刷厂 | 网架支座@球铰支座@钢结构支座@成品支座厂家@万向滑动支座_桥兴工程橡胶有限公司 | 彼得逊采泥器-定深式采泥器-电动土壤采样器-土壤样品风干机-常州索奥仪器制造有限公司 | 建筑资质代办-建筑资质转让找上海国信启航 | 氢氧化钙设备_厂家-淄博工贸有限公司| 耐磨陶瓷,耐磨陶瓷管道_厂家-淄博拓创陶瓷科技| 镀锌方管,无缝方管,伸缩套管,方矩管_山东重鑫致胜金属制品有限公司 | 玄米影院| 自恢复保险丝_贴片保险丝_力特保险丝_Littelfuse_可恢复保险丝供应商-秦晋电子 | TPE塑胶原料-PPA|杜邦pom工程塑料、PPSU|PCTG材料、PC/PBT价格-悦诚塑胶 | 手持式线材张力计-套帽式风量罩-深圳市欧亚精密仪器有限公司 | 建筑资质代办-建筑企业资质代办机构-建筑资质代办公司 | 上海物流公司,上海货运公司,上海物流专线-优骐物流公司 | 安徽千住锡膏_安徽阿尔法锡膏锡条_安徽唯特偶锡膏_卡夫特胶水-芜湖荣亮电子科技有限公司 | 不锈钢列管式冷凝器,换热器厂家-无锡飞尔诺环境工程有限公司 | 深圳宣传片制作-企业宣传视频制作-产品视频拍摄-产品动画制作-短视频拍摄制作公司 | 浙江华锤电器有限公司_地磅称重设备_防作弊地磅_浙江地磅售后维修_无人值守扫码过磅系统_浙江源头地磅厂家_浙江工厂直营地磅 | 煤矿支护网片_矿用勾花菱形网_缝管式_管缝式锚杆-邯郸市永年区志涛工矿配件有限公司 | 空冷器|空气冷却器|空水冷却器-无锡赛迪森机械有限公司[官网] | 消防泵-XBD单级卧式/立式消防泵-上海塑泉泵阀(集团)有限公司 | 半自动预灌装机,卡式瓶灌装机,注射器灌装机,给药器灌装机,大输液灌装机,西林瓶灌装机-长沙一星制药机械有限公司 | 大数据营销公司_舆情监测软件_上海SEO公司-文军营销官网 | 旗杆生产厂家_不锈钢锥形旗杆价格_铝合金电动旗杆-上海锥升金属科技有限公司 | 天津仓储物流-天津电商云仓-天津云仓一件代发-博程云仓官网 | 陕西自考报名_陕西自学考试网 | 高压负荷开关-苏州雷尔沃电器有限公司 | 金联宇电缆总代理-金联宇集团-广东金联宇电缆实业有限公司 | 电动液压篮球架_圆管地埋式篮球架_移动平箱篮球架-强森体育 | 河南卓美创业科技有限公司-河南卓美防雷公司-防雷接地-防雷工程-重庆避雷针-避雷器-防雷检测-避雷带-避雷针-避雷塔、机房防雷、古建筑防雷等-山西防雷公司 | 净化板-洁净板-净化板价格-净化板生产厂家-山东鸿星新材料科技股份有限公司 | 东莞螺杆空压机_永磁变频空压机_节能空压机_空压机工厂批发_深圳螺杆空压机_广州螺杆空压机_东莞空压机_空压机批发_东莞空压机工厂批发_东莞市文颖设备科技有限公司 | 骨灰存放架|骨灰盒寄存架|骨灰架厂家|智慧殡葬|公墓陵园管理系统|网上祭奠|告别厅智能化-厦门慈愿科技 | 企业管理培训,企业培训公开课,企业内训课程,企业培训师 - 名课堂企业管理培训网 |