Automating user addition

Discussion in 'Installation/Configuration' started by catdude, Aug 14, 2007.

  1. catdude

    catdude New Member

    I've got another question for the forum. I'd probably be better off posting this to the developer's forum, but since I don't have post access there yet I'll try here.

    I'm working on some automation scripts. I am exporting domain names and email addresses within those domain names from our existing hosting platform, and I want to have a script read those exported files and automatically create a new user per for each domain, define the domain, and create the e-mail address within that domain on the ISPCOnfig machine.

    I've made some progress, simply stuffing records of the appropriate type (at least, what I believe to be of the appropriate type :)) into the isp_dep, isp_isp_domain, etc tables. However, I'm not really sure that I'm stuffing the right stuff into the right tables.

    I am now invetigating the PHP library files to see if I can find any functions to call to automate this but I'm not making any progress. Could anyone point me to existing PHP functions I can call to make my life easier?

    I would normally use the SOAP interface I've heard about, but we're running the version of ISPConfig released just before the SOAP interface became available, and I don't have the luxury of upgrading my ISPConfig install.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Hi,

    the soap interface works fine with current stable releases and will work with older stable releases as well. You dont have to update your ISPConfig to the dev branch.

    Just recompile the php that comes with ISPConfig as described here:

    http://www.howtoforge.com/forums/showthread.php?t=11873

    Adding the users manually to the tables is very error prone and setting all permission records in isp_node and isp_dep is really compliacted if you want to do it manually,
     
  3. catdude

    catdude New Member

    Bummer! I'm afraid I'm still going to have to do it manually, I'll just have to do extensive error checking. The problem is that I'm not able at this time to recompile my PHP, due to circumstances beyond my control.

    Are there any library functions available to:
    * Add a user
    * Add a domain under that user, and
    * Add email addresses within that domain?

    Because those are the functions my script has to perform.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    No, there are no such functions that can be called by external scripts.

    If you can not recompile your PHP, setup a new server in a VMware virtual machine with identical setup and recompiled PHP, import the users and then sync the complete setup to your production server:

    http://www.howtoforge.com/forums/showthread.php?t=2717
     
  5. catdude

    catdude New Member

    Remoting framework

    Given the alternatives, it sounds like the least painful alternative is to rebuild php with xml and make use of the remoting framework. I got permission from TPTB to do so, so I now have PHP with xml installed.

    Now I'm going to hunt down the Remoting Framework and get it set up.

    Thank you for all your assistance. Management is paying a lot of attention to this project and I'm under a lot of pressure, so your help is much appreciated.
     
  6. Tommahawk

    Tommahawk New Member

    I am working and have almost finished a PHP script using remoting framework that Sets up a client, Sets up a website and paypal integrated so basically the user signsup pays and logs in to uploads their website. but I am encoutnering some issues with remoting being tampered with the latest stable version, apparently some code has gone missing and while the isp_isp_kunde is created the sys_user is not created which then causes the script to fail setting up a website. I have posted the issue and apparently its going to get checked out.

    I will post the script hopefully someone can help improve on it.

    Finished the script, I cam now automate adding a user and 1 website with Paypal integration.
    I'm having second thoughts about releasing it perhaps you ought to click on the sponser ads or I'll make it available to ISPConfig so they can sell it for 9.95 or something.
     
    Last edited: Aug 15, 2007
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Hi Tommahawk, as I posted already in your other threads, there is no code missing.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    You might find here some older instructions for the remoting framework in the forum that tells you to install the ioncube loader. Installing ioncube is not nescessary anymore, just recompile PHP and then install the remoting framework.
     

Share This Page