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 returning zip

Discussion in 'General Discussion' started by Netmaking, Feb 28, 2003.

  1. Netmaking

    Netmaking Member

    Joined:
    Feb 28, 2003
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I've browsed the forums for about an hour now trying to locate posts by people having a problem similar to mine. Suprisingly, I've found none, so I'm making my own post.

    I'm trying out the remote access feature for the first time and have copied some code (PHP) from the manual at http://www.cpanel.net/manual/remoteaccess-php.html. However, the functions aren't returning any values, meaning that the resulting page is blank.

    I've tried to remove parameters and altering the remote access key to get some response at all, and that does of course return various error msgs. However, when I run the following script, nothing is printed out. And before anyone asks: yes, there does exist packages on the server.

    [script]
    <?php
    require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
    $host = "localhost";
    $user = "root";
    $accesshash = 'removed for security reasons';

    $pkgs = listpkgs($host,$user,$accesshash, 0);
    print_r($pkgs);

    ?>
    [/script]

    Does anyone have any idea as to what the problem could be?

    Thanks in advance !


    Sincerely,

    Eirik Johansen
     
  2. jimcarter

    jimcarter Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK
    Hi,
    Make sure that you have entered the accesshash correctly,
    also make sure that your php installation has been compiled with the socket functions, and curl with ssl if you are using ssl to connect to your server,
    Thanks
     
  3. gic

    gic Well-Known Member

    Joined:
    Jun 28, 2002
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    Also, search for my most recent post. The string you have there should not return anything on the screen. You have to echo your variable.

    Other than that, you just need the root access hash and if usessl = 0 does not work, try it with one. That would mean that you need cURL on if it is 1.

    Let me know if you need anymore help.
     
  4. jimcarter

    jimcarter Well-Known Member

    Joined:
    Jun 30, 2002
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK
    Look at the code he posted,
    he is trying to list the packages so he should be getting output from the script
     
  5. gic

    gic Well-Known Member

    Joined:
    Jun 28, 2002
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    Oops, sorry missed that. Okay, then take my other comments in.

    Do you have a reseller account or are you ROOT?
     
  6. Netmaking

    Netmaking Member

    Joined:
    Feb 28, 2003
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I'm root, so it really makes no sense.
     
Loading...

Share This Page