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.

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:
    1
    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:
    16
    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:
    1
    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:
    6
    for unlimited try -1 as the value instead of "unlimited" :P
     
  5. jimb

    jimb Member

    Joined:
    Sep 12, 2002
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    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:
    6
    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
     
  7. kcdworks

    kcdworks Well-Known Member

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

Share This Page