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!

PHP Acccounting - unlimited bandwidth limit.

Discussion in 'cPanel Developers' started by jimb, Dec 4, 2003.

  1. jimb

    jimb Member

    Joined:
    Sep 12, 2002
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    151
    Hi,

    I am trying to us the PHP accounting module - every now and again when createacct() executes I get:

    Sorry, you cannot create an account with an unlimited bandwidth limit.

    Yet none of my packages use unlimited bandwidth - any ideas?
     
  2. andyf

    andyf Well-Known Member

    Joined:
    Jan 7, 2002
    Messages:
    246
    Likes Received:
    0
    Trophy Points:
    316
    Location:
    UK
    /var/cpanel/packages

    regardless of what whm says, check that your packages do have bandwidth limits. If this is correct then maybe your post is getting corrupted somewhere - using SSL may help?
     
  3. jimb

    jimb Member

    Joined:
    Sep 12, 2002
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    151
    Hi,

    All of the packages have b/w limits, and using SSL just gives a blank reply :( anyone got any other ideas?

    The code I use is simple:

    PHP:
    $reply createacct ($host,$user,$accesshash,$usessl,$acctdomain,$acctuser,$acctpass,$acctplan);
    But $reply comes back with:

    "Sorry, you cannot create an account with an unlimited bandwidth limit."

    I can't seem to find anything wrong.
     
  4. Elliot

    Elliot Well-Known Member

    Joined:
    Jan 22, 2002
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    306
    for unlimited try -1 as the value instead of "unlimited" :P
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. jimb

    jimb Member

    Joined:
    Sep 12, 2002
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    151
    The thing is - I don't want unlimited, none of the fields are set that way.
     
  6. Elliot

    Elliot Well-Known Member

    Joined:
    Jan 22, 2002
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    306
    do a var_dump($var); on all the variables you are trying to put into the createacct function to see if any are coming up blank; so that you are certain, it seems like a script error or a variable not being assigned properly
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. kcdworks

    kcdworks Well-Known Member

    Joined:
    Jul 28, 2002
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    166
    Check that your package name does not have a space in it (i.e. MyPlan instead of My Plan)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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