Skip to main content

Why is an account of unlimited space and bandwidth being created, if I'm my package has limits?

Comments

7 comments

  • KostonConsulting
    In that account creation email, the package is HL5 not hostingz_FH5. If you've copied and pasted the php code, you are missing a closing single quote after the package name. It's not clear how you are calling the API as I'm not familiar with the $whm object you are using but you may want to follow the createacct example in the Examples for cPanel's PHP API class:
    0
  • desbest
    I've updated the post to get rid of the php error and update the image. I'd prefer not to use Cpanel's php api class, because when creating an account, it doesn't allow the developer to choose the hosting package the person wants.
    0
  • KostonConsulting
    [quote="desbest, post: 1548482">I've updated the post to get rid of the php error and update the image. I'd prefer not to use Cpanel's php api class, because when creating an account, it doesn't allow the developer to choose the hosting package the person wants.
    0
  • MesinHosting
    from what i know. cpanel api (/https://github.com/CpanelInc/xmlapi-php/blob/master/xmlapi.php) can be use to create and modify such as change package cpanel account as well. and, from what we have know, php was run very fast. so i think, based on that opinion, call the createacct can be run first, and after that you can update for the package. modify an account can be done based on changepackage function (/https://github.com/CpanelInc/xmlapi-php/blob/master/xmlapi.php#L1203) create account can be done based on function createacct (/https://github.com/CpanelInc/xmlapi-php/blob/master/xmlapi.php#L956) this will i do, if i were in your position [PHP] include_once ('xmlapi.php'); $call = new xmlapi($ip); $call -> password_auth('root',$yourpassword); $call -> set_debug(1); $account = array(username => 'theusername',password => 'thepassword',domain => 'thedomain.tld'); $call -> createacct($account); $call -> changepackage('theusername','package_name'); [/PHP] hope that's help
    0
  • desbest
    Thanks for the code sample. I'll try the code sample if the whm.php class file cannot be used. I never thought about using code to change the package, after the account is created. Here's the whm.php file code I was using. The problem is that even when I specify the package to use when creating the hosting account, it creates an unlimited account instead of respecting the package I chose to use.
    0
  • cPanelKenneth
    [quote="desbest, post: 1548482"> I'd prefer not to use Cpanel's php api class, because when creating an account, it doesn't allow the developer to choose the hosting package the person wants.
    0
  • fabioliotta
    i have the same problem, if i use 'quota' example $account = array(username => 'theusername', password => 'thepassword', domain => 'thedomain.tld', 'quota' => '3500'); doesn't working, if i check WHM i see unlimited as quota instead of 3500 How is possible fixing this problem ? any help please? thanks in advance
    0

Please sign in to leave a comment.