PHP SOAP本地服务器错误

问题描述:

I'm struggling to get SOAP working on server locally. It's running on server and from my local PC I can use it, but when I'm using ssh to the server (both PC on linux) php gives me the error:

Error occurred: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://192.168.1.2:8080/WebServices/SetValues?WSDL' : failed to load external entity "http://192.168.1.2:8080/WebServices/SetValues?WSDL"

I tried Lynx locally from server and it's working fine. So problem is somewhere in PHP, SOAP...

我正在努力让SOAP在本地服务器上工作。 它在服务器和我的本地PC上运行我可以使用它,但是当我使用ssh到服务器(Linux上的两台PC)时,php给了我错误: p>

  发生错误:SOAP-ERROR:解析WSDL:无法从“http://192.168.1.2:8080/WebServices/SetValues?WSDL”加载:无法加载外部实体“http://192.168.1.2:8080/WebServices  / SetValues?WSDL“
  code>  pre> 
 
 

我从服务器本地尝试了Lynx,它工作正常。 因此问题出在PHP,SOAP ... p> div>

setsebool -P httpd_can_network_connect 1

SE Linux was my problem!!! If anything happens with networking (even locally) blame SE Linux or firewall.

Is your server binded to local (127.0.0.1)? Try to bind to 0.0.0.0