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.

cPanel's remote access (Accounting.php.inc)

Discussion in 'General Discussion' started by datocp, Jun 27, 2007.

  1. datocp

    datocp Registered

    Joined:
    Jun 12, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hello,
    I've tried to follow the guide found here,But all I got is a blank page.
    Both cURL and SSL mod are installed & enabled.
    There's no value for open_basedir.
    I've changed the username and hashkey (accesshash)
    But I'm unsure about the hashkey:
    I've removed all the new lines and spaces and entered it as 1 huge line. I'm unsure whether that's correct.
    Thanks in advance!
    Best regards,
    datocp.
     
  2. oulzac

    oulzac Well-Known Member

    Joined:
    Aug 7, 2005
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    16
    The Remote Access Key, should be entered as its seen in WHM in the short multiple line format.
     
  3. datocp

    datocp Registered

    Joined:
    Jun 12, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for your response!
    I've tried to just copy & paste the remote access key-It didn't worked.
    Then,I've tried to add a <br/> to the end of each line,But still-A blank page.
    Can you please provide an example how should I enter the access key?
    Thanks in advance!
    Best regards,
    datocp
     
  4. rejected

    rejected Well-Known Member

    Joined:
    Sep 19, 2006
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    0
    Turn on error reporting and make sure display_errors is set to On in your php.ini
     
  5. oulzac

    oulzac Well-Known Member

    Joined:
    Aug 7, 2005
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    16
    PHP:
    #!/usr/local/cpanel/3rdparty/bin/php


    <?php

    require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
    $host "localhost";
    $user "myusername";
    $accesshash '9b15fe95a4fda0a5cb383818d709a21f
    52b4852e50a75318ba693c47bf82445f
    611ff80d6b929e90dea39673ccf5050c
    59000e91317b464ff628acc026bd8ea1
    f626bd54ca16b57hb6b2007f396460f4
    0e65c4ac637118449f77dd1437c10e41
    15f5a088b4dbf61e178b2ced046336c2
    1b867287dfd4cfe8d8fae922d29c7984
    aad8af9b63dd26186454c026ba3177a7
    1d00ccd1ea8a34287e6109fc2f8ac08e
    20d21ef990f69a06622d92eb1fc990a1
    7dc374558884a9d0a878e06d61245a69
    8a271af795782747651624d780f0b80e
    e9b9ad28e52c1cdff7989d235467ccf2
    3ee36dcaa9901ae76feaea5e8912764f
    bbb513ea5379c1f4319f9e2ee7f36489
    2bf40b9dd7ac0e452c583aa3ba4451ae
    e45e075e65878d960057f262bb8ba2d4
    36429c5ed3b1a80896634f5f390e83c2
    9c4ba6704d3459999b2b7fa5df369ce1
    acc6b839ad86aef88a66dc106a429c68
    b03fabf6f187a17a44ef3143c13bdf9c
    e7a81bdb8eaea663481a362144fd5f17
    f4d3fa4c018ae39a2a14ea4a230bb5d7
    9ad72bd89726a0c8560745957fcca1ce
    056f3eff22cde4fceec58d73b6517f6a
    70691c2a9d7b85fba67b29e79f89e8b7
    92b92d92f7b4e5645acad7cefc462d75
    6081c9aea81481b14eeceb3910219ee0'
    ;

    $accts listaccts($host,$user,$accesshash,0);
    print_r($accts);
    $pkgs listpkgs($host,$user,$accesshash,0);
    print_r($pkgs);
    ?>
    That should work for you, just change the username and the access key.

    I just tested this on a few servers and it works for me.
     
  6. datocp

    datocp Registered

    Joined:
    Jun 12, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Just found the problem:
    I've changed the localhost with the server's IP and now everything works just fine. :)
    Thanks a lot for all your attempts to help!
     
Loading...

Share This Page