I hope someone can help me because I am looking for the solution since 2 working days...
I have a php website which need to request a distant webservice. When I try it on my computer (Win7 + WAMP), it works well. When I try it on the webserver (CentOs6), it return me the following error :
SOAP-ERROR: Parsing WSDL: Couldn't load from
'http://ip_address:8080/gss-0.1/FileUtilities?wsdl' : failed to load
external entity "http://ip_address:8080/gss-0.1/FileUtilities?wsdl"
NB: the webservice is on the same network of my webserver (I do not use the same IP/port).
I know that the WSDL is accessible from the webserver because it is accessible using curl linux function.
curl http://ip_address:8080
My php code is:
<?php
$wsdl = "http://ip_address:8080/gss-0.1/FileUtilities?wsdl";
try{
$client = new SoapClient($wsdl ,array('trace' => 1,
'exceptions'=> 1,
'cache_wsdl' => WSDL_CACHE_NONE
));
}
catch(Exception $e) {
echo $e->getMessage();
}?>
If its not firewalled there at your web server and its working in your local but not at your webserver(CentOS). its might be a case of different PHP version and php.ini settings. Can you compare your PHP version and those below extensions in your CentOs server with your WAMP at local.
S0AP, php_openssI, openssI, curI;
OK I found a solution but I don't understand the problem...
So I execute this Linux command
setsebool -P httpd_can_network_connect on
And now all is running !
Response here: Thanks to user2533111