
5th December 2011, 15:19
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,896
Thanks: 693
Thanked 4,190 Times in 3,207 Posts
|
|
Your code is very different from the examples, e.g. you escaped that path this way "\/var\/www\/clients\/client135\/web3800" and normally a / has not to be escaped and where are all the other website parameters, the example has 39 values in the params array and you have 18.
You should really check the examples again, they had been tested right before 3.0.4 was released and they worked at that time so I assume that they still work as the remote API as not changed from 3.0.4 to 3.0.4.1.
|

6th December 2011, 13:26
|
|
Senior Member
|
|
Join Date: Jul 2007
Location: Italy
Posts: 654
Thanks: 77
Thanked 12 Times in 7 Posts
|
|
Hi Till,
the path is escaped because the array that I shown you is a json encode array.
These are your parameters for sites_ftp_user_add:
Code:
$params = array(
'server_id' => 1,
'parent_domain_id' => 1,
'username' => 'threep',
'password' => 'wood',
'quota_size' => 10000,
'active' => 'y',
'uid' => '5000',
'gid' => '5000',
'dir' => 'maybe',
'quota_files' => -1,
'ul_ratio' => -1,
'dl_ratio' => -1,
'ul_bandwidth' => -1,
'dl_bandwidth' => -1
);
and these are mine:
Code:
Paramenters: {
"server_id":1,
"parent_domain_id":3800,
"username":"jdoe_ftp1",
"password":"bexujuga",
"quota_size":"3000",
"active":"y",
"uid":"web135",
"gid":"client3800",
"dir":"\/var\/www\/clients\/client135\/web3800",
"quota_files":-1,
"ul_ratio":-1,
"dl_ratio":200,
"ul_bandwidth":-1,
"dl_bandwidth":100
}
These are your parameters for sites_web_domain_add:
Code:
$params = array(
'server_id' => 0,
'ip_address' => '',
'domain' => 'test2.int',
'type' => 'vhost',
'parent_domain_id' => 0,
'vhost_type' => 'name',
'hd_quota' => 100000,
'traffic_quota' => -1,
'cgi' => 'y',
'ssi' => 'y',
'suexec' => 'y',
'errordocs' => 1,
'is_subdomainwww' => 1,
'subdomain' => '',
'php' => 'y',
'ruby' => 'n',
'redirect_type' => '',
'redirect_path' => '',
'ssl' => 'n',
'ssl_state' => '',
'ssl_locality' => '',
'ssl_organisation' => '',
'ssl_organisation_unit' => '',
'ssl_country' => '',
'ssl_domain' => '',
'ssl_request' => '',
'ssl_cert' => '',
'ssl_bundle' => '',
'ssl_action' => '',
'stats_password' => '',
'stats_type' => 'webalizer',
'allow_override' => 'All',
'apache_directives' => '',
'php_open_basedir' => '/',
'custom_php_ini' => '',
'backup_interval' => '',
'backup_copies' => 1,
'active' => 'y',
'traffic_quota_lock' => 'n'
);
and these are mine:
Code:
Parameters: {
"server_id":"1",
"ip_address":"",
"domain":"testdomain.com",
"type":"vhost",
"parent_domain_id":0,
"vhost_type":"name",
"hd_quota":"3000",
"traffic_quota":"12000",
"errordocs":1,
"is_subdomainwww":1,
"subdomain":"www",
"php":"fast-cgi",
"active":"y",
"traffic_quota_lock":"n",
"system_user":"web1",
"allow_override":"All",
"custom_php_ini":"",
"apache_directives":""
}
I have sent the main and not null parameters because I think that you have check all the parameters received from a calling or not?!
Have I to send all the parameters?
Thanks for your help.
|

6th December 2011, 14:40
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,896
Thanks: 693
Thanked 4,190 Times in 3,207 Posts
|
|
All functions require it that you send the full set of parameters. Just compare the record that you created with your function call with a record that you created in ispconfig to see the difference why yours dont work.
|
|
The Following User Says Thank You to till For This Useful Post:
|
vaio1 (6th December 2011)
|

20th December 2011, 12:58
|
|
Junior Member
|
|
Join Date: Dec 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Problem with password when adding new mailbox
Guys, please help, I'm pulling my leftovers of my hair here
I have taken the same configuration of remote API that adds mail_user database and i can view it in mail_user table , however when trying to open the mail trough roundcube webmail I cannot register, however when i go to ispconfig admin and change the password for the mailbox and save,
wala i enter, and i dont want to reset manually the password for every creation I do.
$params = array('server_id' => 1,
'email' =>$full_insert_email,
'login' =>$full_insert_email,
'password' => $password2,
'name' =>$_SESSION['eng_name1'],
'uid' =>500,
'gid' =>500,
'maildir' => '/var/vmail/XXXX/'.$_insert_mail,
'quota' => 104857600,
'homedir' =>'/var/vmail/',
'autoresponder' =>'n',
'autoresponder_start_date' =>'',
'autoresponder_end_date' =>'',
'autoresponder_text' =>'',
'move_junk' =>'n',
'custom_mailfilter' =>'spam',
'postfix' =>'y',
'disableimap' =>'n',
'disablepop3' =>'n',);
$domain_id = $client->mail_user_add($session_id,1 , $params);
Thank you
|

22nd December 2011, 11:10
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,896
Thanks: 693
Thanked 4,190 Times in 3,207 Posts
|
|
Compare the record that you inserted with the api with the record after you updated it in ispconfig to see which differences are causing the issue.
|

22nd December 2011, 17:23
|
|
Junior Member
|
|
Join Date: Dec 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Till, Thank you for the reply
I'm really puzzled about this thing. I enter the above parameters and then try to log in to roundcube and it doesn't do it,
I have done as you said and the only thing that is not the same is password (encrypted one=$1$QlQgwqMy$iE8UYspAlqIX9nXqFYHx80 vs $1$Shloly56$AXmt3MoTga/g3K2LJV2wu/ ) inside mysql database in mail_user table.
Please Help
|

4th December 2012, 15:41
|
|
Junior Member
|
|
Join Date: Dec 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
nearly one year later
i ran into the same issue, that everthing gets created but no login possible. In my case i had to set the homedir to '/var/vmail' and the login worked after that.
|

4th December 2012, 16:37
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,896
Thanks: 693
Thanked 4,190 Times in 3,207 Posts
|
|
Quote:
|
i ran into the same issue, that everthing gets created but no login possible. In my case i had to set the homedir to '/var/vmail' and the login worked after that.
|
Thats correct, the homedir of a mail user has always to be set to root directory of the maildir structure which is normally /var/vmail. See example script in the remote api documentation in svn.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 05:03.
|
Recent comments
19 hours 51 min ago
1 day 5 hours ago
1 day 6 hours ago
1 day 9 hours ago
1 day 14 hours ago
1 day 14 hours ago
1 day 16 hours ago
2 days 2 hours ago
2 days 7 hours ago
2 days 9 hours ago