久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<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="qwawimqqmiuu" 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="qwawimqqmiuu" 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賬號..

                  使用此代碼我發(fā)出肥皂請求

                  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();
                  }
                  

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

                  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
                  

                  引發(fā)更少的異常

                  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
                  

                  引發(fā)更少的異常

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

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

                  引發(fā)更少的異常

                  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

                  更新

                  經(jīng)過多次測試,我認為問題出在網(wǎng)絡上,soap server后面有一個反向代理,問題出現(xiàn)在代理上.

                  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.

                  推薦答案

                  您需要進一步改進調(diào)試工作:

                  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(); 中創(chuàng)建的嗎?您可以在 catch() 塊中添加一些調(diào)試代碼,例如:

                  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 或類似服務器上的問題的錯誤點
                    • 無法連接錯誤指向網(wǎng)絡問題(并非唯一,但這種情況的可能性更高)
                    • 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)

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

                      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模板網(wǎng)!

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

                  相關文檔推薦

                  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算法的實現(xiàn))
                  Sending a byte array from PHP to WCF(將字節(jié)數(shù)組從 PHP 發(fā)送到 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="qwawimqqmiuu" 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>
                          • 主站蜘蛛池模板: 日本午夜免费福利视频 | 91偷拍精品一区二区三区 | 亚洲精品乱码久久久久久蜜桃91 | 丁香五月缴情综合网 | 精品久久久久久亚洲精品 | 毛片网在线观看 | 亚洲视频免费在线观看 | 亚洲精品一区二区三区蜜桃久 | 欧美一区成人 | 欧洲精品在线观看 | 黄网免费 | 国产精品久久久久久久久免费丝袜 | 亚洲电影成人 | 最新国产精品视频 | 久久毛片网站 | 亚洲国产精品一区二区第一页 | 亚洲视频一区二区三区 | 亚洲一一在线 | 日日干夜夜操天天操 | 久久一二区| 精品91| 欧美精品日韩精品国产精品 | 久热久热 | 91精品久久久久久久久久 | 国产97视频在线观看 | 成人精品视频免费 | 久久久精品综合 | 日韩精品在线一区 | 夜夜夜夜草 | 国产一区二区三区www | 91久久看片 | 国产精品美女久久久 | 中文二区 | 夜夜爽99久久国产综合精品女不卡 | 天堂色综合 | 午夜久久久久久久久久一区二区 | 九九热在线免费观看 | 一区二区三区视频在线观看 | 婷婷亚洲综合 | 国产精品美女视频 | 欧美日韩黄 |