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 15th March 2011, 10:38
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,951
Thanks: 825
Thanked 5,362 Times in 4,209 Posts
Default ISPConfig 3.0.3.3-RC1 available for testing

The first release candidate (RC1) version of the upcoming ISPConfig 3.0.3.3 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 3.0.3.2

Changelog

http://bugtracker.ispconfig.org/inde...&status[]=

Download

http://www.ispconfig.org/downloads/I...3.3-rc1.tar.gz

Update instructions

Code:
cd /tmp
rm -rf /tmp/ispconfig3_install
wget http://www.ispconfig.org/downloads/ISPConfig-3.0.3.3-rc1.tar.gz
tar xvfz ISPConfig-3.0.3.3-rc1.tar.gz
cd ispconfig3_install/install
php -q update.php
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following 4 Users Say Thank You to till For This Useful Post:
edge (15th March 2011), holykim (20th March 2011), itanium (17th March 2011), xaver (17th March 2011)
Sponsored Links
  #2  
Old 27th March 2011, 01:11
xaver xaver is offline
Member
 
Join Date: May 2009
Posts: 77
Thanks: 10
Thanked 25 Times in 14 Posts
Default

2 Problems with API
-> addclient password dose not work (updateClient work)
Problem is remoting_lib.inc.php
PHP Code:
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
Lines
PHP Code:
        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']));
                
$params=array_merge($params,$template);
            } 
-> My own function in remoting.inc.php for getting next webID without SQL in my API.
PHP Code:
/* Get next AutoIncrement for sites_web_domain_add */

    
public function sites_web_domain_nextID($session_id)
    {
        global 
$app;
        if(!
$this->checkPerm($session_id'sites_web_domain_get')) {
            
$this->server->fault('permission_denied''You do not have the permissions to access this function.');
            return 
false;
        }
        
$table_info $app->db->queryOneRecord("SHOW TABLE STATUS LIKE 'web_domain'");
        return 
$table_info["Auto_increment"];
    } 

Last edited by xaver; 27th March 2011 at 15:14.
Reply With Quote
The Following User Says Thank You to xaver For This Useful Post:
falko (27th March 2011)
  #3  
Old 27th March 2011, 20:33
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

I've added this to our bugtracker, so we will check that.
__________________
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
  #4  
Old 27th March 2011, 22:29
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,951
Thanks: 825
Thanked 5,362 Times in 4,209 Posts
Default

Quote:
This is normal md5 pw and if you comment out this line it work
The password encryption mechanism used in current ispconfig versions is crypt and not md5.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 27th March 2011, 23:07
xaver xaver is offline
Member
 
Join Date: May 2009
Posts: 77
Thanks: 10
Thanked 25 Times in 14 Posts
Default

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 remoting_lib.inc.php -> NO crypt -> after a update the account work perfect:
PHP Code:
        function ispconfig_sysuser_update($params,$client_id){
            global 
$app;
            
$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";
            
$app->db->query($sql);
        } 
ADD in remoting_lib.inc.php -> crypt -> login with API created account wont work:
PHP Code:
            $salt="$1$";
            
$base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
            for (
$n=0;$n<8;$n++) {
                
$salt.=$base64_alphabet[mt_rand(0,63)];
            }
            
$salt.="$";
            
$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 ('$username',md5('$password'),'$modules','$startmodule','$usertheme','$type','$active','$language',$groups,$groupid,$insert_id)"

Add a normal account in ispconfig and look into the database in sys_user table -> its md5.
client table is crypt.

Last edited by xaver; 27th March 2011 at 23:13.
Reply With Quote
  #6  
Old 27th March 2011, 23:17
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,951
Thanks: 825
Thanked 5,362 Times in 4,209 Posts
Default

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

Code:
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.
__________________
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:
xaver (28th March 2011)
  #7  
Old 27th March 2011, 23:54
xaver xaver is offline
Member
 
Join Date: May 2009
Posts: 77
Thanks: 10
Thanked 25 Times in 14 Posts
Default

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 remote.inc.php 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.

PHP Code:
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;
    
$php_open_basedir="/var/www/clients/client".$this->client_id."/web".$this->web_id."/web:/var/www/clients/client".$this->client_id."/web".$this->web_id."/tmp:/var/www/".$this->domain."/web:/usr/share/php5:/tmp";
 
    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) {
        die(
'SOAP Error: '.$e->getMessage());
    }

i hope its understandable.

xaver
Reply With Quote
  #8  
Old 28th March 2011, 00:15
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,951
Thanks: 825
Thanked 5,362 Times in 4,209 Posts
Default

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.
__________________
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:
xaver (28th March 2011)
  #9  
Old 28th March 2011, 01:27
xaver xaver is offline
Member
 
Join Date: May 2009
Posts: 77
Thanks: 10
Thanked 25 Times in 14 Posts
Default

cool thx, i will try it tomorrow
Reply With Quote
  #10  
Old 28th March 2011, 11:26
conceptnet conceptnet is offline
HowtoForge Supporter
 
Join Date: Feb 2011
Posts: 4
Thanks: 0
Thanked 2 Times in 1 Post
 
Default

I get this problem without this params:

SOAP Error: documentroot_error_empty
sysuser_error_empty
sysgroup_error_empty
php_open_basedir_error_empty

Wont work without this params

Last edited by conceptnet; 28th March 2011 at 16:53.
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
How do i uninstall ISPConfig 3 RC1 altaibskt Installation/Configuration 5 11th August 2009 09:41
Backup sites with ISPConfig 3.0.0.8 RC1 ARray General 1 8th February 2009 17:42
Virtual email users in ISPConfig 3 RC1 Fr0sty Installation/Configuration 3 4th February 2009 20:55
ISPConfig 3 RC1 Incoming eMail AceFrahm Developers' Forum 15 4th February 2009 04:14
ISPConfig 3.0.0.6 Beta released till General 38 21st September 2008 19:15


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


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