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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

"0" quotas using whmapi1

Discussion in 'cPanel Developers' started by Haym, Jul 12, 2017.

Tags:
  1. Haym

    Haym Active Member

    Joined:
    May 12, 2017
    Messages:
    28
    Likes Received:
    5
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hello,

    Are there any plans to update whmapi1 to support "0" quotas for the "MAXPOP", "MAXSQL" and "MAXFTP" parameters on the "modifyacct" endpoint?

    The behaviour of treating "0" as "unlimited" is inconsistent with other parameters such as "MAXSUB". The WHM GUI does support "0" values for these quotas.

    Can you advise me how to set such quotas programatically, perhaps over SSH if it's not possible using the API?

    Thanks
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm unable to reproduce this issue when testing the modifyacct WHM API 1 function via the command line. For example, I ran this command:

    Code:
    whmapi1 modifyacct user=user123 MAXSQL=0
    Attempting to create a MySQL database via cPanel for this account correctly resulted in the following error message:

    Do you notice different behavior? If so, could you verify which version of cPanel is installed on this server and how you are reproducing the issue?

    Thank you.
     
  3. Haym

    Haym Active Member

    Joined:
    May 12, 2017
    Messages:
    28
    Likes Received:
    5
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    To be honest, I haven't actually tried it yet, I was just working from the docs: WHM API 1 Functions - modifyacct - Software Development Kit - cPanel Documentation

    The docs state:
    • A positive integer between one and 999,999.
    • 0, unlimited, or null — The account possessesunlimited databases.
    I'm running the latest version of cPanel. If the docs are wrong, that's very good news for me.

    That being said, if the docs are wrong, this is yet another mistake in the docs which has caused confusion for me (especially on this page). If that's the case, I think you really need someone to go through these docs!
     
  4. Haym

    Haym Active Member

    Joined:
    May 12, 2017
    Messages:
    28
    Likes Received:
    5
    Trophy Points:
    3
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hello,

    I can confirm "0" values are working fine from here too, over the HTTP API. Thanks for your help. I was originally going to have to change the way my app works because of this, so it's good to know it was just an issue with the docs. Please do consider having someone check over the API docs (not just fix these few parameters, as I've noticed various other issues too).

    Thanks
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    #5 cPanelMichael, Jul 12, 2017
    Last edited: Aug 9, 2017
Loading...

Share This Page