API2 Code working but timing out
Hi Guys,
I have an issue with the api2 queries, my code for adding a new doman and ftp is:
The code DOES work, the problem is the addon domain query (query1) executes then timeouts, i never receive a response, i do with (query2) it returns the simplexml fine, i cannot figure out the issue! any tips would be appreciated Graham
// setup
$xmlapi = new xmlapi($cpanelH);
$xmlapi->password_auth($cpanelU,$cpanelP);
$xmlapi->set_debug(1);
$xmlapi->set_port(2083);
$xmlapi->set_output('array');
// setup
// add an addon-domain
$args1 = array('dir'=> "public_html/".$cpanelD, 'newdomain'=> $cpanelD, 'subdomain'=> $cpanelD);
$query1 = $xmlapi->api2_query($cpanelU, 'AddonDomain', 'addaddondomain', $args1);
print ""; print_r($query1); print "
";
// add an addon-domain
// add an ftp account
$args2 = array('user'=> $cpanelF, 'pass'=> $cpanelP, 'quota'=> 20, 'homedir'=> "public_html/".$cpanelD);
$query2 = $xmlapi->api2_query($cpanelU, 'Ftp', 'addftp', $args2);
print ""; print_r($query2); print "
";
// add an ftp account
The code DOES work, the problem is the addon domain query (query1) executes then timeouts, i never receive a response, i do with (query2) it returns the simplexml fine, i cannot figure out the issue! any tips would be appreciated Graham
-
Hello, Do you notice any output to /usr/local/cpanel/logs/error_log when this happens? Thank you. 0
Please sign in to leave a comment.
Comments
1 comment