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!

Account Summary Error

Discussion in 'cPanel Developers' started by risklife, Dec 19, 2014.

  1. risklife

    risklife Member

    Joined:
    Dec 16, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks, now i have other problem, i use my XMLAPI for get account summary, but i have a error, saved in the error_log.




    Code:
    [20-Dec-2014 05:03:32 Europe/Moscow] RESPONSE:
     <accountsummary>
      <acct>
        <backup>X</backup>
        <disklimit>unlimited</disklimit>
        <diskused>16M</diskused>
        <domain>XX</domain>
        <email>XX</email>
        <ip>XX</ip>
        <is_locked>0</is_locked>
        <legacy_backup>0</legacy_backup>
        <max_defer_fail_percentage>50</max_defer_fail_percentage>
        <max_email_per_hour>100</max_email_per_hour>
        <maxaddons>unlimited</maxaddons>
        <maxftp>unlimited</maxftp>
        <maxlst>unlimited</maxlst>
        <maxparked>unlimited</maxparked>
        <maxpop>unlimited</maxpop>
        <maxsql>unlimited</maxsql>
        <maxsub>unlimited</maxsub>
        <min_defer_fail_to_trigger_protection>5</min_defer_fail_to_trigger_protection>
        <owner>root</owner>
        <partition>home</partition>
        <plan>ilimitado</plan>
        <shell>/usr/local/cpanel/bin/noshell</shell>
        <startdate>14 May 10 04:39</startdate>
        <suspended>0</suspended>
        <suspendreason>not suspended</suspendreason>
        <suspendtime></suspendtime>
        <theme>x3</theme>
        <unix_startdate>1399682389</unix_startdate>
        <user>cloneswp</user>
      </acct>
      <status>1</status>
      <statusmsg>Ok</statusmsg>
    </accountsummary>
    
    <!-- Web Host Manager 11.46.1.4 (c) cPanel, Inc. 2014 http://cpanel.net/ Unauthorized copying is prohibited. -->
    THIS IS SAVED WHEN UPDATE THE PAGE.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Re: Account Sumary Error

    Hello :)

    Could you let us know the full steps we can take to reproduce the issue? What error message do you receive?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. risklife

    risklife Member

    Joined:
    Dec 16, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Re: Account Sumary Error

    Well, i received this error when try get account summary for obtain Total Disk in a account.

    The error is saved in error_log (apache)

    This is the code:

    PHP:
    include("xmlapi.php");

    $ip "localhost";

    # The access has can be found on your server under WHM's "Setup remote access hash" section or at /root/.accesshash
    $root_hash 'HASH';

    $ruta_user $_SERVER['DOCUMENT_ROOT'];
    $pregPattern "/\/home\/(.*?)\/public_html/s";
    preg_match($pregPattern,$ruta_user,$Match2);
    $xmlapi = new xmlapi($ip);
    $xmlapi->hash_auth("root",$root_hash);
    $xmlapi->return_xml(1);
    $xmlapi->set_debug(1);

    $username $Match2[1];

    $xmlapi->accountsummary($username);


    $xmlstr $xmlapi->accountsummary($username);
    $sPattern "/<disklimit>(.*?)<\/disklimit>/s";
    preg_match($sPattern,$xmlstr,$aMatch);
     
  4. risklife

    risklife Member

    Joined:
    Dec 16, 2014
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    The problem was fixed, change $xmlapi->set_debug(1); to $xmlapi->set_debug(0);
     
  5. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    575
    Likes Received:
    20
    Trophy Points:
    143
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Thank you for updating this thread with your solution. I'm glad you were able to solve the issue.
     
    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