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.

myprivs query

Discussion in 'cPanel Developers' started by jhyland87, Jun 29, 2009.

  1. jhyland87

    jhyland87 Well-Known Member

    Joined:
    Dec 8, 2008
    Messages:
    153
    Likes Received:
    0
    Trophy Points:
    16
    So I am making a script, the first step is to see what privs the user has, as in reseller or root...

    I run a pretty basic query...
    PHP:
    $str $xmlapi-> xmlapi_query('myprivs');
    echo 
    $str;
    When ran as root, it works fine, all is 0 except for all, which is 1.

    When ran as a reseller, it just times out... any idea?

    EDIT:
    Damn near all API queries hang as a reseller..
    List accounts
    list suspended
    list accts over quota
    restarting services

    Any idea why these wont work? The reseller has rights to them..
     
  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
    Add the following line of code above your xmlapi_query line:

    PHP:
    $xmlapi->set_debug(1);
    Then paste the output (full source code) of the function. Please redact any passwords if any appear in the output.
     
Loading...

Share This Page