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.

Number of accounts on server via API

Discussion in 'General Discussion' started by 4u123, Jul 22, 2008.

  1. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    765
    Likes Received:
    1
    Trophy Points:
    18
    As part of a billing script we use there is a simple function that contacts the cpanel server and pulls out via the API the number of hosting accounts on the server.

    One of our servers is reporting via the API that it only has 172 accounts when it actually holds 249.

    If I view the accounts using WHM I see the correct number.

    So, can anyone tell me where this account tally is stored for use by the API so I can fix it?

    many thanks.
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I am not familiar with an API call in the XML API that specifically returns the number of accounts on a server. Can you perhaps provide the API call you are using for this?
     
  3. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    765
    Likes Received:
    1
    Trophy Points:
    18
    Thanks David, I'll ask the developer how the script pulls that info across.
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Sounds like the script is parsing the output of listaccts.
     
  5. 4u123

    4u123 Well-Known Member
    PartnerNOC

    Joined:
    Jan 2, 2006
    Messages:
    765
    Likes Received:
    1
    Trophy Points:
    18
    I've found the problem, it was a configuration issue.

    The server's whm address was configured in the script incorrectly so it couldnt connect - but - instead of reporting an error that it couldnt connect, the script just displayed the details from the last time it successfully connected.

    Apologies for taking up your time with this.
     
    #5 4u123, Jul 23, 2008
    Last edited: Jul 23, 2008
Loading...

Share This Page