Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 24th May 2006, 16:00
Jose Gosalbez Jose Gosalbez is offline
Junior Member
 
Join Date: May 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Automatic user creation script with PHP and SOAP

I have installed the SOAP addon in ISPCONFIG and after I put the PHP examples in a server directory.

I have created a remote user with the login "remote" and the pass "remote"

Mi title for the domain is "Main"

This is the code I Tried

/******************************************* */

include("soap.lib.php");

// Insert here your 42go Server
$server_url = "https://localhost:81";

// creating object for SoapClient
$soapclient = new soapclient($server_url.'/remote/index.php');

// Username and Password of the remoting user (not identical
// with the user to log into the web interface!)

$parameters = array('user' => 'remote',
'pass' => 'remote');

// Login into 42go Server
$session_id = $soapclient->call('login',$parameters);

// Error Check
if($err = $soapclient->getError()) die("Error: ".$err);


// Add a User
$params = array ( 'sid' => $session_id,
'module' => 'web',
'function' => 'user_add',
'params' => array ( web_title => 'main', // web_title or web_id
user_username => 'prueba',
user_name => 'prueba',
user_email => 'prueba',
user_passwort => '123456',
user_speicher => 10,
user_mailquota => 10,
user_admin => 0
));

$user_id = $soapclient->call('service',$params);
if($err = $soapclient->getError()) die("Error: ".$err);
print_r($user_id);


/************************************************** ****/

This script doesnt say anything... but the user is not added to "Main" account. Why?

I have ISPCONFIG 2.2.2.... Need I a upgrade?
Reply With Quote
Sponsored Links
  #2  
Old 24th May 2006, 18:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Quote:
Originally Posted by Jose Gosalbez
$server_url = "https://localhost:81";

// creating object for SoapClient
$soapclient = new soapclient($server_url.'/remote/index.php');

// Username and Password of the remoting user (not identical
// with the user to log into the web interface!)

$parameters = array('user' => 'remote',
'pass' => 'remote');
Is the URL correct? Are the username and password correct?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 24th May 2006, 18:11
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,260 Times in 4,124 Posts
 
Default

Quote:
Originally Posted by Jose Gosalbez
I have ISPCONFIG 2.2.2.... Need I a upgrade?

Remoting is not supported by ISPConfig 2.2.2. Only the development releases support remoting yet!

Before you update to 2.3.1-dev, dont forget to install the libxml2-dev package from your linux distribution, or the upgrade will fail.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

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


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


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