views:

27

answers:

1

I have a php script using nusoap to connect to a web service on:

$uri = 'http://soap.1011.my-online-check.com:8080/avavoip_gate.php?wsdl';

$client = new nusoap_client($uri, true, false, false, false, false, 30, 90);

$client->setHeaders($headers);

$result = $client->call($method, $args);

It works fine on my Mac.

However, when I upload the very same script to both my webhosting providers both using cpanel, one of which is bluehost.com, the script fails with the following error:

Error: wsdl error: Getting 'http://soap.1011.my-online-check.com:8080/avavoip_gate.php?wsdl - HTTP ERROR: Couldn't open socket connection to server 'http://soap.1011.my-online-check.com:8080/avavoip_gate.php?wsdl, Error (110): Connection timed out

So I installed CentOS on my other PC to test the script. Initially I got the same error above, but after setting SELinux to Permissive instead of Enforcing, the script worked fine too.

I have tried asking my hosting providers to change the SELinux settings but to no avail. Any advice on how I could possibly get my script to work on my webhosting providers?

A: 

I have tried asking my hosting providers to change the SELinux settings but to no avail

Did they refuse, or did they simply not respond?

The SELinux restriction in question pretty much boils down to "can Apache and things it spawns make HTTP connections?", so if they're unwilling to change that permission, you're pretty much up a creek.

That being said, a timeout is not usually what you get when SELinux blocks an action. Usually you'd see a "permission denied" instead. There may be something else blocking the outgoing connection.

Charles
Thanks for the prompt reply. One of the providers said that they have set SELinux to permissive but I am still getting that error. Not sure what else to ask them to do to get the problem fixed.
John