Creating an account via API freeze
Hi all,
Iv'e just got myself a resller account, and im having some slight issues trying to automate my cpanel account creations.
So far, iv'e only ran a little test script, to use the api an create the account. It works with:
GitHub - CpanelInc/xmlapi-php: A PHP Class for Interacting with cPanel's XML-API
Snippet:
It works just fine, the account is created fairly quickly, the problem is the php script seems to get stuck waiting on the response i assume? the "DONE" won't get echoed, an the page eventually dies via timeout. I can't go ahead an put this into my site as is because the rest of the script wouldn't get ran.... I found this post from another user: WHM API1 createacct slowness Which is almost identical to my problem. I have gone ahead an asked my hosts to change the Apache WORKER MPM setting as he mentions, but they have delayed in doing so and right now im left just twiddling my thumbs hoping they get around to it sooner rather than later. I thought i would post here in the mean time to see if there is anything else anyone knows of that could be causing it to happen. Appreciate your help, Thanks - Craig.
);
$xmlapi->set_port(2087);
$xmlapi->password_auth('USERNAME', 'PASSWORD');
$xmlapi->set_output('array');
$xmlapi->set_debug(0);
$newAccount = array(username => "example2",
password => "1234567",
domain => "example2.com",
pkgname => "myPAckage",
contactemail => "example2@example.com");
$account_status = $xmlapi->createacct($newAccount);
echo("DONE");
?>It works just fine, the account is created fairly quickly, the problem is the php script seems to get stuck waiting on the response i assume? the "DONE" won't get echoed, an the page eventually dies via timeout. I can't go ahead an put this into my site as is because the rest of the script wouldn't get ran.... I found this post from another user: WHM API1 createacct slowness Which is almost identical to my problem. I have gone ahead an asked my hosts to change the Apache WORKER MPM setting as he mentions, but they have delayed in doing so and right now im left just twiddling my thumbs hoping they get around to it sooner rather than later. I thought i would post here in the mean time to see if there is anything else anyone knows of that could be causing it to happen. Appreciate your help, Thanks - Craig.
-
Hello, Do you have access to modify PHP settings on your account? If so, you could increase the max_execution_time value for PHP until you hear back from your web hosting provider. Thank you. 0
Please sign in to leave a comment.
Comments
1 comment