Ok this is nightmare.
1st server (for ftp, master dns)
2nd server (for email, slave dns)
After turning on cluster on master server I can not add accounts via cpanel api to 2nd server. When I turn off cluster everything works just fine.
I do not have anything in log files, etc.
Here is some code for this:
Any idea?PHP Code://hosting account
$xmlapi = new xmlapi(HOSTING_CPANEL_IP);
$xmlapi->password_auth(HOSTING_CPANEL_USER,HOSTING_CPANEL_PASS);
$acct1 = array( username => $cpanel_user, password => $cpanel_pass, domain => $domain);
$xmlapi->createacct($acct1); // create hosting account
$xmlapi->setsiteip(USERS_SERVER_IP_1,$cpanel_user); // set to local ip ex. 10.0.0.1
$xmlapi->editzonerecord($domain,16,array(address => HOSTING_CPANEL_IP));
//mail accounts
$xmlapi_email = new xmlapi(EMAILS_CPANEL_IP);
$xmlapi_email->password_auth(EMAILS_CPANEL_USER,EMAILS_CPANEL_PASS);
$acct2 = array( username => $cpanel_user, password => $cpanel_pass, domain => $domain );
$mail_acc_cr = $xmlapi_email->createacct($acct2);
//some dns edit
$mail_server_name = 'mail.'.$domain;
$xmlapi->editzonerecord($domain,20,array(exchange => $mail_server_name));
$xmlapi->editzonerecord($domain,22,array(type => 'A', address => EMAILS_CPANEL_IP));



LinkBack URL
About LinkBacks
Reply With Quote




