Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Creating an account via API freeze

Discussion in 'General Discussion' started by craigbaines, Dec 18, 2016.

  1. craigbaines

    craigbaines Registered

    Dec 18, 2016
    Likes Received:
    Trophy Points:
    United Kingdom
    cPanel Access Level:
    Reseller Owner
    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


    include_once 'xmlapi.php';
    $xmlapi = new xmlapi($_SERVER['HTTP_HOST']);
    $xmlapi->password_auth('USERNAME', 'PASSWORD');
    $newAccount = array(username => "example2",
    password => "1234567",
    domain => "",
    pkgname => "myPAckage",
    contactemail => "");
    $account_status = $xmlapi->createacct($newAccount);

    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.
    #1 craigbaines, Dec 18, 2016
    Last edited by a moderator: Dec 18, 2016
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    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.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice