Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th February 2012, 19:30
paddox paddox is offline
Junior Member
 
Join Date: Feb 2012
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Unhappy mistake in API add_client.php???

Hi, i'm trying to use the remote api so i can link my webhosting website to ispconfig and automatically add clients

this works, but when i log in with this newly created account with no user limits (quota = unlimited) the user can't add a database, website, maildomain, mailbox

when i add a client through ispconfig's panel and then log in with this user I can create a website, mailbox, maildomain, database.

So I went on a search and when I look in the clients tabel of de ispconfig database I can see a difference in the parent_client_id.

client added through remote api,parent_client_id = 1
client added through ispconfig panel, parent_client_id = 0

when I Changed de parent_client_id of the user made with the remote api to 0, suddenly he could add a website,database,...

So the next step was to edit the client_add function, the parameter parent_client_id was changed to 0.

But when I add this client and check it through the database it still gives a 1

so then i tried to comment out the paramater parent_client_id in the add_client function because in the table structure of clients the default value is zero, but still it is set to 1

I use the latest stable version of ispconfig 3 and Debian 6.0 (sqeeuze) and I followed the perfect setup for ispconfig 3 for Debian 6.0

thx for any advice in advance!

Last edited by paddox; 26th February 2012 at 19:53.
Reply With Quote
Sponsored Links
  #2  
Old 27th February 2012, 10:16
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,461
Thanks: 813
Thanked 5,240 Times in 4,108 Posts
Default

If you set the parent_client_id with your script, then this means that you attach this client to a reseller. If this reseller does not exist or has reached its limits, then you can not add any new items as the reseller limit has been recahed.

The solution is to fix your script and set $reseller_id = 0 (its the second parameter) of the client_add function.

There is no need to change any code of the remote API.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
paddox (27th February 2012)
  #3  
Old 27th February 2012, 12:59
paddox paddox is offline
Junior Member
 
Join Date: Feb 2012
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default

thx alot till! We will try it out!
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Horde Groupware Webmail Edition ByteMe Networking Tips/Tricks/Mods 17 20th December 2012 10:12
Amavis/ClamAv problem MattJo. General 7 20th October 2010 17:18
Newb: Result of nessus scan Slowhand Installation/Configuration 12 4th June 2009 15:31
Client Website MySQL Database Names Lister Installation/Configuration 4 12th January 2008 17:21
printing to a network printer ojs Installation/Configuration 4 24th February 2006 11:05


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


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