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

由于“無法加載外部實體",無法連接到 Mag

Unable to connect to Magento SOAP API v2 due to quot;failed to load external entityquot;(由于“無法加載外部實體,無法連接到 Magento SOAP API v2)
本文介紹了由于“無法加載外部實體",無法連接到 Magento SOAP API v2的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我無法使用 PHP 連接到 Magento SOAP API v2.出現的錯誤是:

I am unable to connect to the Magento SOAP API v2 using PHP. The error that occurs is:

PHP 致命錯誤:未捕獲的 SoapFault 異常:[WSDL] SOAP 錯誤:解析 WSDL:無法從 'http://www.example.com/index.php/api/v2_soap/index/wsdl/1/':無法加載外部實體 "http://www.example.com/index.htmlphp/api/v2_soap/index/wsdl/1/"

PHP Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.example.com/index.php/api/v2_soap/index/wsdl/1/' : failed to load external entity "http://www.example.com/index.php/api/v2_soap/index/wsdl/1/"

看起來,WSDL 正在加載,但它包含的外部 SOAP 文件沒有加載.

As it seems, the WSDL is being loaded, but the external SOAP file which it includes not.

PHP 連接代碼:

$client = new SoapClient('http://www.example.com/api/v2_soap?wsdl=1');
$session = $client->login('username', 'password');

<小時>

從 v2_soap?wsdl=1 文件中截取:


Snip from v2_soap?wsdl=1 file:

<service name="MagentoService">
    <port name="Mage_Api_Model_Server_V2_HandlerPort" binding="typens:Mage_Api_Model_Server_V2_HandlerBinding">
        <soap:address location="http://www.example.com/index.php/api/v2_soap/index/"/>
    </port>
</service>

<小時>

Magento 版本為 1.5.1.0.

推薦答案

此問題是由于服務器無法從本地機器訪問文件造成的.所以可能的原因可能是 DNS 服務器或/etc/hosts,但它實際上是一個 .htaccess 文件阻止了除我們的開發計算機之外的任何主機.這導致了 403 Forbidden 錯誤,進而導致了 SOAP 錯誤等等.

This problem is caused by the server not being able to access the file from the local machine. So the possible cause could've been the DNS server or /etc/hosts, but it was actually a .htaccess file blocking any hosts except from our development computers. This resulted in a 403 Forbidden error, which resulted in the SOAP error and so on..

這篇關于由于“無法加載外部實體",無法連接到 Magento SOAP API v2的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數組自動填充選擇框)
PHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 從 MSSQL-SELECT 產生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
主站蜘蛛池模板: 免费黄色的视频 | 国产在线观看免费 | 精品久久久久一区二区国产 | 久久久久国产精品 | 亚洲永久字幕 | 国产亚洲精品综合一区 | 女人夜夜春 | 中文字幕一二三区 | 毛片在线看看 | 久久亚洲一区二区三 | 亚洲精品综合 | a级在线免费 | 精品熟人一区二区三区四区 | 精品久久久久久亚洲精品 | 久久久国产一区 | 欧美激情视频网站 | 亚洲一区二区三区在线免费 | 成人美女免费网站视频 | 蜜桃精品噜噜噜成人av | 亚洲天天 | 99视频网 | 国产精品999 | 亚洲精品一区二区三区蜜桃久 | 亚洲精品在线视频 | 精品久久电影 | 美女人人操 | 成人午夜精品 | 亚洲成人福利在线观看 | 天堂资源最新在线 | 国产精品久久久久久久久动漫 | 欧美伊人 | 国产精品成人一区二区三区 | 国产一区二区av | 色狠狠一区 | 成人免费视频在线观看 | 蜜臀网| 精品亚洲第一 | 国产精品网址 | 亚洲成在线观看 | 国产剧情一区 | 青青草国产在线观看 |