The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

xmp api 1 create account problem

Discussion in 'cPanel Developers' started by phpniki, Sep 15, 2014.

  1. phpniki

    phpniki Registered

    Joined:
    Sep 15, 2014
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi dear,
    I'm trying to create new account in my whm with script and my codes are below but when xmlapi-createacct() called source is going to die please help me .

    PHP:
            $xmlapi = new xmlapi($cpanel_host);

            
    $xmlapi->hash_auth($cpanel_user,$whmhash);

            
    $xmlapi->set_port("2086");
            
            
    $xmlapi->set_debug(1);
            
    $xmlapi->set_output('xml');

            
    $acct = array( 
                        
    'username' => $username
                        
    'domain' => $domain,
                        
    'plan'=>$plan_name,            
                        
    'password' => $password
                        
    'contactemail'=>$member_email,
                        
    'cgi'=>'1',
                        
    'dkim'=>'1',
                        
    'spf'=>'1',
                        
    'cpmod'=>'x3',
                        
    'ownerself'=>'1'
                        
    'hasuseregns'=>'1'
                        
    );
            
            
            echo 
    "Start";
            
    $res $xmlapi->createacct($acct);
            echo 
    "End";
            
    var_dump($res);
            echo 
    $res;


    Thanks
    Regards
     
  2. phpniki

    phpniki Registered

    Joined:
    Sep 15, 2014
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    here is my curl test logs

    Code:
    * About to connect() to XXXX.com port 2086 (#0)
    *   Trying X.X.X.X...
    * connected
    * Connected to XXXXX.com (X.X.X.X) port 2086 (#0)
    > GET /scripts5/wwwacct?sign=&plan=XXXXX_gold&domain=asd94f8e.com&username=asd94f8e&password=94f8e865dd&contactemail=XXXXXX@XXXX.com&dbuser=asd94f8e&msel=n%2Cy%2C500%2Cn%2Cx3%2Cunlimited%2Cunlimited%2Cunlimited%2Cunlimited%2Cunlimited%2C50000%2Cn%2C3%2C1%2Cdefault%2Cen%2C%2C%2C%2Cn%2CXXXXX_gold&pkgname=&featurelist=default&quota=500&bwlimit=50000&maxftp=unlimited&maxpop=unlimited&maxlst=unlimited&maxsql=unlimited&maxsub=unlimited&maxpark=3&maxaddon=1&max_email_per_hour=unlimited&max_defer_fail_percentage=unlimited&customip=--Auto+Assign--&cgi=1&cpmod=x3&language=en&hasuseregns=1&dkim=1&spf=1&mxcheck=local HTTP/1.1^M
    Host: XXXXX.com:2086^M
    Accept: */*^M
    Authorization: WHM USERXXXX:WHM_HASHKEY^M
    ^M
    < HTTP/1.1 200 OK^M
    < Server: cpsrvd/11.44.1.18^M
    < X-Keep-Alive-Count: 1^M
    < Connection: Keep-Alive^M
    < Keep-Alive: timeout=70, max=200^M
    < Transfer-Encoding: chunked^M
    < Date: Mon, 15 Sep 2014 09:25:28 GMT^M
    < Content-type: text/html; charset=utf-8^M
    < ^M
    * Connection #0 to host XXXX.com left intact
    * Re-using existing connection! (#0) with host (nil)
    * Connected to (nil) (X.X.X.X) port 2086 (#0)
    > GET /scripts5/wwwacct?sign=&plan=XXXXX_gold&domain=asd94f8e.com&username=asd94f8e&password=94f8e865dd&contactemail=XXXXXX@XXXX.com&dbuser=asd94f8e&msel=n%2Cy%2C500%2Cn%2Cx3%2Cunlimited%2Cunlimited%2Cunlimited%2Cunlimited%2Cunlimited%2C50000%2Cn%2C3%2C1%2Cdefault%2Cen%2C%2C%2C%2Cn%2CXXXXX_gold&pkgname=&featurelist=default&quota=500&bwlimit=50000&maxftp=unlimited&maxpop=unlimited&maxlst=unlimited&maxsql=unlimited&maxsub=unlimited&maxpark=3&maxaddon=1&max_email_per_hour=unlimited&max_defer_fail_percentage=unlimited&customip=--Auto+Assign--&cgi=1&cpmod=x3&language=en&hasuseregns=1&dkim=1&spf=1&mxcheck=local HTTP/1.1^M
    Host: XXXXX.com:2086^M
    Accept: */*^M
    Authorization: WHM USERXXXX:WHM_HASHKEY^M
    ^M
    < HTTP/1.1 200 OK^M
    < Server: cpsrvd/11.44.1.18^M
    < X-Keep-Alive-Count: 1^M
    < Connection: Keep-Alive^M
    < Keep-Alive: timeout=70, max=200^M
    < Transfer-Encoding: chunked^M
    < Date: Mon, 15 Sep 2014 09:25:28 GMT^M
    < Content-type: text/html; charset=utf-8^M
    < ^M
    * Connection #0 to host XXXXX.com left intact
    * Re-using existing connection! (#0) with host (nil)
    * Connected to (nil) (X.X.X.X) port 2086 (#0)
    > GET /scripts5/wwwacct?sign=&plan=XXXXX_gold&domain=asd94f8e.com&username=asd94f8e&password=94f8e865dd&contactemail=XXXXXX@XXXX.com&dbuser=asd94f8e&msel=n%2Cy%2C500%2Cn%2Cx3%2Cunlimited%2Cunlimited%2Cunlimited%2Cunlimited%2Cunlimited%2C50000%2Cn%2C3%2C1%2Cdefault%2Cen%2C%2C%2C%2Cn%2CXXXXX_gold&pkgname=&featurelist=default&quota=500&bwlimit=50000&maxftp=unlimited&maxpop=unlimited&maxlst=unlimited&maxsql=unlimited&maxsub=unlimited&maxpark=3&maxaddon=1&max_email_per_hour=unlimited&max_defer_fail_percentage=unlimited&customip=--Auto+Assign--&cgi=1&cpmod=x3&language=en&hasuseregns=1&dkim=1&spf=1&mxcheck=local HTTP/1.1^M
    Host: XXXXX.com:2086^M
    Accept: */*^M
    Authorization: WHM USERXXXX:WHM_HASHKEY^M
    ^M
    < HTTP/1.1 200 OK^M
    < Server: cpsrvd/11.44.1.18^M
    < X-Keep-Alive-Count: 2^M
    < Connection: Keep-Alive^M
    < Keep-Alive: timeout=70, max=200^M
    < Transfer-Encoding: chunked^M
    < Date: Mon, 15 Sep 2014 09:25:39 GMT^M
    < Content-type: text/html; charset=utf-8^M
    < ^M
    * Connection #0 to host (nil) left intact
    * Closing connection #0
     
    #2 phpniki, Sep 15, 2014
    Last edited by a moderator: Sep 15, 2014
Loading...

Share This Page