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!

remote access problems

Discussion in 'General Discussion' started by ScarabWeb, Aug 22, 2004.

  1. ScarabWeb

    ScarabWeb Member

    Joined:
    Aug 21, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    151
    I have tried listing the packages in my WHM by using the example script provided:

    <?php
    require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
    $host = "localhost";
    $user = "<USERNAME HERE>";
    $accesshash = '<REMOTE ACCESS KEY HERE>';

    $accts = listaccts($host,$user,$accesshash,0);
    print_r($accts);
    $pkgs = listpkgs($host,$user,$accesshash,0);
    print_r($pkgs);
    ?>​

    But it doesn't work. All I get is a page full of garbage, like this:
    ArrayArray ( [] => Array ( [0] => ) [] => Array ( [0] => ) [] => Array ( [0] => ) [ Array ( [0] => "Content-Type" content ) [ Array ( [0] => "shortcut icon" href ) [] => Array ( [0] => ) [] => Array ( [0] => ) [] => Array ( [0] => ) [Array ( [0] => "603" border ) [ Array ( [0] => "top"> ) [ ] => Array ( [0] => ) [ Array ( [0] => "100%" border ) [ ​

    and so on...

    Any idea what's wrong?
     
  2. fwwebs

    fwwebs Well-Known Member

    Joined:
    Feb 16, 2004
    Messages:
    329
    Likes Received:
    0
    Trophy Points:
    166
    It seems to be working, if you look through the "garbage" you should see your packages. Use the strip tags option in your php to clean it up.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. ScarabWeb

    ScarabWeb Member

    Joined:
    Aug 21, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    151
    I'm sorry, but there is no sign at all of any of my hosting plans within that "garbage". Just a couple of HTML codes here and there, and a login sequence for WHM, and that's it.
     
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