HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   General (
-   -   Remoting API problems (

aneeshnl 1st December 2012 09:39

Remoting API problems

I am trying to use remoting API to my ISPconfig3.5 Beta1. I have an installation of ISPconfig on my test server and I do development on my local machine.

When trying to execute client add.php, its showing as:


<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV=""><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>login_failed</faultcode><faultstring>The login failed. Username or password wrong.</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
SOAP Error: The login failed. Username or password wrong.

Please let me know where I am doing wrong.

My soap_config.php

PHP Code:

$password 'admin';

$soap_location = 'http://localhost:8080/ispconfig3_3.0.5/interface/web/remote/index.php';
$soap_uri = 'http://localhost:8080/ispconfig3_3.0.5/interface/web/remote/';

$soap_location '';
$soap_uri '';

My soap_database_add.php

PHP Code:


$password 'admin';

$soap_location '';
$soap_uri '';

$client = new SoapClient(null, array('location' => $soap_location,
'uri'      => $soap_uri));
try {
$session_id $client->login($username,$password)) {
"Logged:".$session_id."<br />\n";

$database_type 'mysql'//Only mysql type avaliable more types coming soon.
$database_name 'dbispconfig';
$database_username 'root';
$database_password '<my MySQL root password>';
$database_charset ''// blank = db default, latin1 or utf8
$database_remoteips ''//remote ipīs separated by commas

$params = array(
'server_id' => 1,
'type' => $database_type,
'database_name' => $database_name,
'database_user' => $database_username,
'database_password' => $database_password,
'database_charset' =>  $database_charset,
'remote_access' => 'n'// n disabled - y enabled
'active' => 'y'// n disabled - y enabled
'remote_ips' => $database_remoteips

$client_id 1;
$database_id $client->sites_database_add($session_id$client_id$params);

$client->logout($session_id)) {
"Logout.<br />\n";

} catch (
SoapFault $e) {
'Error: '.$e->getMessage());


aneeshnl 2nd December 2012 21:40

Could anyone please help me on this?

I am stuck

almere 2nd December 2012 21:59


To use remote API you should crate a new Remote user (System->Remote users). And then use login and password from that remote user. Don't forget to give site permission to that user (you can do it while adding a remote user).

aneeshnl 3rd December 2012 10:14

Thanks a ton.

Saved my day.

All times are GMT +2. The time now is 12:45.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.