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.

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:
    1
    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:
    16
    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.
     
  3. ScarabWeb

    ScarabWeb Member

    Joined:
    Aug 21, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    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