久久久久久久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賬號..

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

                  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="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>
                          • 主站蜘蛛池模板: 亚洲国产成人精品女人久久久 | 成人亚洲精品久久久久软件 | 国产亚洲精品久久情网 | 国产精品国产三级国产aⅴ无密码 | 日韩精品一二三区 | 国产乱码精品1区2区3区 | 97日韩精品 | 午夜影院在线观看免费 | 亚洲欧美日韩高清 | 在线黄 | 色888www视频在线观看 | 国产日韩一区二区三区 | 少妇av片| 久草福利 | 国产精品久久久久久久久久久久 | 欧美国产亚洲一区二区 | 国产成人在线免费 | 祝你幸福电影在线观看 | 欧美日韩国产三级 | 亚洲欧美日韩在线 | 成人欧美一区二区三区黑人孕妇 | 免费欧美视频 | 日韩视频免费看 | 亚洲一区免费视频 | 亚洲免费人成在线视频观看 | 国产精品美女www爽爽爽 | 欧美一区二区三区久久精品 | 精品入口麻豆88视频 | 成人av观看 | 99久久婷婷国产亚洲终合精品 | 欧美一区二区三 | 视频在线一区二区 | 亚洲一区综合 | 一级毛片免费完整视频 | 99精品福利视频 | 91大神xh98xh系列全部 | 成人h免费观看视频 | 99视频在线免费观看 | 久久国产精品精品 | 国产毛片久久久久久久久春天 | 中文无吗 |