ISPConfig available for testing

Discussion in 'Developers' Forum' started by till, Mar 15, 2011.

  1. till

    till Super Moderator Staff Member ISPConfig Developer

    The first release candidate (RC1) version of the upcoming ISPConfig is available for download. RC versions are released for testing purposes, it is not recommended to use them on production systems.

    This release is a bugfix release for ISPConfig



    Update instructions

    cd /tmp
    rm -rf /tmp/ispconfig3_install
    tar xvfz ISPConfig-
    cd ispconfig3_install/install
    php -q update.php
  2. xaver

    xaver New Member

    2 Problems with API
    -> addclient password dose not work (updateClient work)
    Problem is
    Line 695 $password crypt(stripslashes($password),$salt);
    This is normal md5 pw and if you comment out this line it work

    -> Delete a User Domain stays. Not sites i mean module Domain

    -> updateclient template_master not included
            if(isset($params['template_master']) and $params['template_master'] > 0)
    $template=$app->db->queryOneRecord("SELECT * FROM client_template WHERE template_id=".intval($params['template_master']));
    -> My own function in for getting next webID without SQL in my API.
    /* Get next AutoIncrement for sites_web_domain_add */

    public function sites_web_domain_nextID($session_id)
    $this->checkPerm($session_id'sites_web_domain_get')) {
    $this->server->fault('permission_denied''You do not have the permissions to access this function.');
    $table_info $app->db->queryOneRecord("SHOW TABLE STATUS LIKE 'web_domain'");
    Last edited: Mar 27, 2011
  3. falko

    falko Super Moderator ISPConfig Developer

    I've added this to our bugtracker, so we will check that.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The password encryption mechanism used in current ispconfig versions is crypt and not md5.
  5. xaver

    xaver New Member

    If you use API and dont comment it out, password wont work.
    In next lines are the insert with md5('.$password.') in the query.

    UPDATE in -> NO crypt -> after a update the account work perfect:
            function ispconfig_sysuser_update($params,$client_id){
    $username $app->db->quote($params["username"]);
    $password $app->db->quote($params["password"]);
    $client_id intval($client_id);
    $sql "UPDATE sys_user set username = '$username', passwort = md5('$password') WHERE client_id = $client_id";
    ADD in -> crypt -> login with API created account wont work:
                for (
    $n=0;$n<8;$n++) {
    $password crypt(stripslashes($password),$salt);
    $sql1 "INSERT INTO sys_user (username,passwort,modules,startmodule,app_theme,typ,active,language,groups,default_group,client_id)
                VALUES ('
    Add a normal account in ispconfig and look into the database in sys_user table -> its md5.
    client table is crypt.
    Last edited: Mar 27, 2011
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    [I checked the file. The crypt line is correct. The bug was in line 697 which has to be:

    VALUES ('$username','$password','$modules','$startmodule','$usertheme','$type','$active','$language',$groups,$groupid,$insert_id)";
    Thanks for reporting the bug. I fixed the sql statement in svn.
  7. xaver

    xaver New Member

    Ok this way work too :)

    i hope you give Domain Module and client_update with templates a look too ;)
    getNextID, maybe next version -> The Idear was for a post in forum. The post used mysql connection...

    I have still another problem and found no solution.
    I wrote 3 versions for API use.
    1. version i changed a lot in for add a website and it worked
    2. version never in use on my system..
    3. on dev server no problem, on productive server wont work.

    if i setup a account with api, it work but client is always client0 -> but variable isset....
    if i setup with interface, document root, system group .. everything is same as i send with API.

    public function addWebsite($traffic,$webspace){
    $this->web_id $this->sites_web_domain_nextID();
    $documentroot "/var/www/clients/client".$this->client_id."/web".$this->web_id;
    $system_user "web".$this->web_id;
    $system_group 'client'.$this->client_id;
        try {
    $params = array('server_id' => $this->serverid,
    'ip_address' => '*',
    'domain' => $this->domain,
    'type' => 'vhost',
    'parent_domain_id' =>'',
    'vhost_type' =>'name',
    'hd_quota' => $webspace,
    'traffic_quota' => $traffic,
    'cgi' =>'n',
    'ssi' =>'n',
    'suexec' =>'n',
    'errordocs' =>'1',
    'subdomain' =>'www',
    'ssl' =>'n',
    'php' =>'mod',
    'active' => 'y',
    'redirect_type' =>'',
    'redirect_path' =>'',
    'ssl_state' =>'',
    'ssl_locality' =>'',
    'ssl_organisation' =>'',
    'ssl_organisation_unit' =>'',
    'ssl_country' =>'',
    'ssl_domain' =>'',
    'ssl_request' =>'',
    'ssl_cert' =>'',
    'ssl_bundle' =>'',
    'ssl_action' =>'',
    'stats_type' => 'webalizer',
    'stats_password' =>'',
    'document_root' => $documentroot
    'system_user' =>$system_user,
    'system_group' =>$system_group,
    'allow_override' =>'Indexes AuthConfig FileInfo',
    'php_open_basedir' => $php_open_basedir,
    'apache_directives' =>'',
    'backup_interval' => 'none',
    'custom_php_ini' => NULL,
    'backup_copies' => 1,
    $this->web_id $this->session->sites_web_domain_add($this->session_id$this->client_id$params);
        catch (
    SoapFault $e) {
    'SOAP Error: '.$e->getMessage());
    i hope its understandable.

  8. till

    till Super Moderator Staff Member ISPConfig Developer

    In the $params array, the parameter "client_group_id" is missing and the paramaters:

    'document_root' => $documentroot,
    'system_user' =>$system_user,
    'system_group' =>$system_group,
    'php_open_basedir' => $php_open_basedir,

    are obsolete as they are set by ispconfig now automatically. client_group_id is the sys_groupid of the website or in other words, the groupid of the client or reseller that owns the website.

    A function to get the next webID is then not needed anymore I guess as all variables relating to the webID are now set by ispconfig.
  9. xaver

    xaver New Member

    cool thx, i will try it tomorrow
  10. conceptnet

    conceptnet New Member

    I get this problem without this params:

    SOAP Error: documentroot_error_empty

    Wont work without this params
    Last edited: Mar 28, 2011
  11. xaver

    xaver New Member


    till told me you need for client_group_id the groupid form sys_group.
    I dont wanna use MySQL in a API... i created a new functionfor this in
        public function client_id_get_SysGroupID($session_id$client_id){
    $this->checkPerm($session_id'sites_web_domain_get')) {
    $this->server->fault('permission_denied''You do not have the permissions to access this function.');
    $sysGroupID $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = '$client_id'");
  12. two2wyes

    two2wyes New Member


    I tried adding the client_id_get_SysGroupID function shared by xaver to get the client_group_id as till was suggesting but I still get the same error:


    I don't understand, as these params are supposed to be filled by ISPConfig...

    I'm using ISPConfig downloaded from sourceforge, maybe I need to download the last version from SVN?

  13. till

    till Super Moderator Staff Member ISPConfig Developer

    This has been fixed in SVN. Please either sue the SVN version if this is for testing / Development only or wait for the 3.0.4 version which will be released soon.

Share This Page