View Single Post
Old 20th February 2013, 15:19
minddigger minddigger is offline
Junior Member
Join Date: Mar 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Question SOAP Error: Could not connect to host

Hi, I want to use the API of ISPConfig and therefore I have made a test script (using example), simply to connect to the SOAP server.
It runs on a Ubuntu 12.04.2 LTS precise server.
I have to mention that I had for about 4 months ago a working script, but now, after I have upgraded the server, it no longer works.

The script is very common:

$username = 'remoteusr';
$password = 'password';

$soap_location = 'https://myserverip:8080/remote/index.php';
$soap_uri = 'https://myserverip:8080/remote/';

$client = new SoapClient(null, array('location' => $soap_location,
'uri' => $soap_uri,
'trace' => 1));

// ini_set('soap.wsdl_cache_enabled',0);
// ini_set('soap.wsdl_cache_ttl',0);

try {
//* Login to the remote server
if($session_id = $client->login(trim($username),trim($password))) {
echo 'Logged into remote server sucessfully. The SessionID is '.$session_id.' - <br>';

//* Logout
if($client->logout($session_id)) {
echo "Logout for session ".$session_id;

} catch (SoapFault $e) {

echo "<br>Please contact the server administator<br>";
die('SOAP Error: '.$e->getMessage());

The getLastRequest gives me the username and password back
The getLastResponse gives me NULL

I don't get what is wrong here, especially where it did work before!!
Reply With Quote
Sponsored Links