Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 2nd September 2011, 15:18
kassyo kassyo is offline
Junior Member
 
Join Date: Oct 2010
Posts: 19
Thanks: 6
Thanked 2 Times in 2 Posts
Default ISPConfig 3 Remote api - SOAP error

Hello everyone,

Im actually doing a script for migrating massive mailboxes from another mail server but when i execute the script appears the following:

PHP Code:
Logged into remote server sucessfullyThe SessionID is 7730995c3dccf15af9ff59596332ed6cSOAP ErrorSOAP-ERROREncodingCannot find encoding 
The script is the following:

PHP Code:
<?php
$username 
'xxxx';
$password 'xxxx';
/*
$soap_location = 'http://localhost:8080/ispconfig3/interface/web/remote/index.php';
$soap_uri = 'http://localhost:8080/ispconfig3/interface/web/remote/';
*/
$soap_location 'http://correo.pruebas.com:8080/remote/index.php';
$soap_uri 'http://correo.pruebas.com:8080/remote/';

$client = new SoapClient(null, array('location' => $soap_location
                                     
'uri'      => $soap_uri));
try {
    
//* Login to the remote server
    
if($session_id $client->login($username,$password)) 
        echo 
'Logged into remote server sucessfully. The SessionID is '.$session_id.'';
    

//$domain_id = $client->mail_user_add($session_id, $client, $params);

$params = array( 'server_id' => '1',
                 
'email' => /*$email*/'pruebas@pruebas.com',/*Direccion completa*/
                 
'password' => /*$password*/'pruebas',
                 
'name' => /*$nombre*/'pruebecitas',
                 
'quota' => '0',
                 
'cc' => '',
                 
'maildir' => '/var/vmail/pruebas.com/'.'pruebas'/*$username*/,
                 
'homedir' => '/var/vmail',
                 
'uid' => '5000',
                 
'gid' => '5000',
                 
'postfix' => 'y',
                 
/*
                 'access' => array (
                    'datatype'    => 'VARCHAR',
                    'formtype'    => 'CHECKBOX',
                    'default'    => 'y',
                    'value'        => array(1 => 'y',0 => 'n')
                 ),
                 */
                 
'disableimap' => 'n',
                 
'disablepop3' => 'n',);
    
$domain_id $client->mail_user_add($session_id$client$params);

//* Logout
    
if($client->logout($session_id)) {
        echo 
"Usuario de correo dado de alta correctamente";
    }
    
} catch (
SoapFault $e) {
    die(
'SOAP Error: '.$e->getMessage());
    echo 
"Please contact the server administator";
}

?>
I think its a php-soap issue but not sure Googled a lot and didnt find anything.

The server config is taken from "The Perfect Server - OpenSUSE 11.4 x86_64 [ISPConfig 3]".

Any thoughts anyone?
Reply With Quote
Sponsored Links
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPCONFIG 3 Email Content Filter jariasca Installation/Configuration 11 2nd August 2012 13:27
Bind9 Error Messages (and a problem with A records...) erosbk Server Operation 0 23rd May 2011 08:18
ISPConfig 3: Monitor Module & Logfiles - All setup correctly? Master One Installation/Configuration 2 10th July 2009 19:51
How to install OpenOficeOrg 3.0.0 in Ubuntu 8.04 ernesthagger HOWTO-Related Questions 43 23rd December 2008 15:42
Could not make OpenSSL yontengyatso Installation/Configuration 3 3rd November 2005 11:50


All times are GMT +2. The time now is 14:26.


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