php soap 错误处理(精简版)

1.使用soap

     $client = "*****";//(wsdl链接在同一主机上)

     $client = new soapclient($wsdl);


2.出现错误如下

     第一种:
                SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://*****.14:8080/rpc/soap/jirasoapservice-v2?wsdl' : failed to load external entity "http://*****.14:8080/rpc/soap/jirasoapservice-v2?wsdl" 


     第二种:(采用nusoap链接方式)

               
wsdl error: Getting http://******.14:8080/rpc/soap/jirasoapservice-v2?wsdl - HTTP ERROR: Couldn't open socket connection to server http://******.14:8080/rpc/soap/jirasoapservice-v2?wsdl, Error (13): Permission denied 

3.原因:

      SELinux 阻止你的 httpd 守护程序与同一台机器上的 LDAP 服务器沟通。

     linux下设置:

   
 $setsebool -P httpd_can_network_connect on


     test ok!!!!

4.参考文档

      http://www.linuxforums.org/forum/redhat-fedora-linux-help/46840-fsockopen-error-13-permission-denied.html(提到httpd错误)
      http://wiki.centos.org/zh/TipsAndTricks/SelinuxBooleans
      http://fedoraproject.org/wiki/SELinux/apache
      [url] http://oss.tresys.com/docs/refpolicy/api/tunables.html[/url]

你可能感兴趣的:(PHP,linux,centos,redhat,SOAP)