我在我的服務器上安裝了Mantis BT 1.2.19,它運行良好。爲了從我的Eclipse-IDE(Mars)中獲益,我安裝了Mantis的Task-Repo插件並嘗試添加連接。Mantis SOAP-Error訪問mantisconnect.php(Eclipse Mylyn-Plugin)
當我在Eclipse中點擊「驗證設置」我收到以下錯誤:
SOAP-ERROR: Parsing WSDL: Couldn't load from '/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl' : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"
在我的錯誤日誌服務器上有以下條目
[14-Oct-2015 11:25:05 Europe/Berlin] [mantisconnect.php] Error Type: SYSTEM WARNING,
Error Description: SoapServer::SoapServer(): I/O warning : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"
Stack Trace:
mantisconnect.php L121 SoapServer(<string>'mantisconnect.wsdl', <Array> { ['features'] => 5 })
[14-Oct-2015 11:25:05 Europe/Berlin] PHP Warning: Uncaught SoapFault exception: [Server] Error Type: SYSTEM WARNING,
Error Description: SoapServer::SoapServer(): I/O warning : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl" in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php:107
Stack trace:
#0 /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php(530): SoapActions::sendSoapFault('Server', 'Error Type: SYS...')
#1 [internal function]: mc_error_handler(2, 'SoapServer::Soa...', '/var/www/vhosts...', 121, Array)
#2 /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.php(121): SoapServer->SoapServer('mantisconnect.w...', Array)
#3 {main}
thrown in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php on line 107
[14-Oct-2015 11:25:05 Europe/Berlin] PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from '/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl' : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"
in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.php on line 121
上面的錯誤是由Mantis插件在訪問URL時生成
188.109.171.76 - - [14/Oct/2015:11:25:05 +0200] "POST /mantis/api/soap/mantisconnect.php HTTP/1.0" 500 1067 "-" "Mylyn/3.17.0 Mylyn-Mantis Connector/3.10.1 Apache Axis/1.4 Eclipse (org.eclipse.epp.package.jee.product) HttpClient/3.1 Java/1.8.0_60 (Oracle) Windows 7/6.1 (amd64; de_DE)"
即使是「正常的」GET-acc ESS上面提到的URL會產生相同的錯誤產生
https://{myhost}/mantis/api/soap/mantisconnect.php
沒有錯誤的訪問
https://{myhost}/mantis/api/soap/mantisconnect.php?wsdl
爲了解決我自己的問題,我查了一些想法:
- 文件是存在的... {myhost}在這裏顯然只是一個佔位符 - 由我放置
- 我切換到網絡服務器的上下文
www-data
,並試圖訪問該文件......這是訪問
所以從來就沒有想到......
PHP版本5.5.9-1ubuntu4.13
上Ubuntu 14.04.3 LTS
€DIT:
將錯誤跟蹤到以下PHP行mantis/api/soap/mantisconnect.php
$server = new SoapServer("mantisconnect.wsdl",
array('features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS)
);
我不明白爲什麼有引發錯誤 - 因爲我說:它的存在,並通過服務器讀取...
€EDIT2:
我取代了線
$server = new SoapServer("mantisconnect.wsdl",
與
$server = new SoapServer("http://{myhost}/mantis/api/soap/mantisconnect.wsdl",
這工作...所以從來就一個 「解決方案」,但我不知道爲什麼通過文件訪問不起作用