#1  
Old 29th July 2013, 17:20
eulet22 eulet22 is offline
Junior Member
 
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default client_update

Hi all!
If I do a client_update with the remoting api I come into the following trouble:
PHP Code:
<?php
error_reporting
(E_ALL);
ini_set('display_errors''1');

require (
'config.inc.php');

$client = new SoapClient(null, array('location' => $soap_location,
                                     
'uri'      => $soap_uri,
                                     
'trace' => 1,
                                     
'exceptions' => 1));

try {
    if(
$session_id $client->login($username,$password)) {
        echo 
'Logged successfull. Session ID:'.$session_id.'<br />';
    }

    
$reseller_id 1;

    
//static parameters
    
$client_id 75;

    
//* Get the client record
    // $client_record = $client->client_get($session_id, $reseller_id);
    
$client_record $client->client_get($session_id$client_id);
   
//* Change parameters


    
$affected_rows $client->client_update($session_id$client_id,      $reseller_id$client_record);

    echo 
"Number of records that have been changed in the database: ".$affected_rows."<br>";

    if(
$client->logout($session_id)) {
        echo 
'Logged out.<br />';
    }

} catch (
SoapFault $e) {
    echo 
'<pre>'.$client->__getLastResponse().'</pre>';
    die(
'SOAP Error: '.$e->getMessage());
The update fails with sys_userid and sys_groupid empty error!
But when I print_r($client_record) the two fields are not empty!
Here is the output:
Code:
db->query(UPDATE `client` SET `company_name` = '', `contact_name` = 'don t delete', `customer_no` = '', `username` = 'dont', `password` = '$1$5TdFZS9r$t3n/mSLt2IGvoS5tW.LDe0', `language` = 'de', `usertheme` = 'default', `street` = '', `zip` = '', `city` = '', `state` = '', `country` = 'DE', `telephone` = '', `mobile` = '', `fax` = '', `email` = 'mb@safedeck.at', `internet` = 'http://', `icq` = '', `vat_id` = '', `company_id` = '', `bank_account_owner` = '', `bank_account_number` = '', `bank_code` = '', `bank_name` = '', `bank_account_iban` = '', `bank_account_swift` = '', `notes` = '', `paypal_email` = '', `template_master` = '4', `template_additional` = '', `default_mailserver` = '1', `limit_maildomain` = '-1', `limit_mailbox` = '-1', `limit_mailalias` = '-1', `limit_mailaliasdomain` = '-1', `limit_mailmailinglist` = '-1', `limit_mailforward` = '-1', `limit_mailcatchall` = '-1', `limit_mailrouting` = '0', `limit_mailfilter` = '-1', `limit_fetchmail` = '-1', `limit_mailquota` = '-1', `limit_spamfilter_wblist` = '0', `limit_spamfilter_user` = '0', `limit_spamfilter_policy` = '0', `default_webserver` = '1', `limit_web_domain` = '-1', `limit_web_quota` = '-1', `web_php_options` = 'no,fast-cgi', `limit_cgi` = 'n', `limit_ssi` = 'n', `limit_perl` = 'n', `limit_ruby` = 'n', `limit_python` = 'n', `force_suexec` = 'y', `limit_hterror` = 'n', `limit_wildcard` = 'n', `limit_ssl` = 'n', `limit_web_aliasdomain` = '-1', `limit_web_subdomain` = '-1', `limit_ftp_user` = '-1', `limit_shell_user` = '0', `ssh_chroot` = 'no', `limit_webdav_user` = '0', `default_dnsserver` = '1', `limit_dns_zone` = '-1', `limit_dns_slave_zone` = '-1', `limit_dns_record` = '-1', `limit_client` = '0', `default_dbserver` = '1', `limit_database` = '-1', `limit_cron` = '2', `limit_cron_type` = 'url', `limit_cron_frequency` = '5', `limit_traffic_quota` = '-1', `limit_openvz_vm` = '0', `limit_openvz_vm_template_id` = '0', `limit_aps` = '-1', `sys_userid` = , `sys_groupid` =  WHERE client_id = 75) called at [/usr/local/ispconfig/interface/lib/classes/remoting.inc.php:2913]
Thx for your help!
Paul
Reply With Quote
Sponsored Links
  #2  
Old 29th July 2013, 19:03
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

Do you have a reseller with ID 1?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 30th July 2013, 10:43
eulet22 eulet22 is offline
Junior Member
 
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It also doesn't work with reseller id=0 (I don't have any resellers)

Thx
Paul
Reply With Quote
  #4  
Old 30th July 2013, 11:07
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

If you dont have any resellers, then reseller_id has to be 0.

And you are sure that there is a client in the "client"database table were client_id = 75?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
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


All times are GMT +2. The time now is 04:48.


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