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.

Help with Remote access ??

Discussion in 'General Discussion' started by demian, Aug 26, 2003.

  1. demian

    demian Member

    Joined:
    Aug 25, 2003
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hello everybody !!

    I need to let my clients make accounts in my webserver through a script that I'm going to do using php.

    And I'm facing a ugly problem since friday with WHM and cpanel !!
    I've in a webserver a reseller account with a user name and password !
    user = "user";
    pass = "pass";

    I'm trying to connect using the script bellow, but nothing happens, never works, some times says ACCESS DENIED, and most of the time I get a white page, I'm trying all those combinations like this:

    <?php
    require '/usr/local/cpanel/Cpanel/Accounting.php.inc';

    //$host = "https://www.hosting.com:2087/";
    $host = "localhost";

    $user = "billing";
    //$user = "root";

    //$accesshash = 'my reseller password';
    $accesshash = 'remote access key(hash, huge number)';

    //$accts = listaccts($host,$user,$accesshash,1);
    $accts = listaccts($host,$user,$accesshash,0);
    print_r($accts);

    //$pkgs = listpkgs($host,$user,$accesshash,1);
    $pkgs = listpkgs($host,$user,$accesshash,0);
    print_r($pkgs);
    ?>

    But it doesn't work at all !!!!!! =/
    So since my configuration is like this, how should I do ?

    //pass to my reseller account
    user = "user";
    pass = "pass";

    //domain
    https://www.hosting.com:2087/

    The versions are:

    WHM 7.4.2 cPanel 7.4.2-S117
    RedHat - WHM X v2.1

    We do have curl + ssh installed for sure, and the administrator guaranteed that it's all up to date, there are 2 accounts in my reseller account plus 15 packages, so it was suposed to be showing something.


    How is the correct way to do this ? Please, I really appreciate any help, tks a lot to everybody !!


    Demian Escobar Fagunde

    cPanel.net Support Ticket Number:
     
  2. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    Are you using a remote access key? You may need to generate one in whm before you can use a remote access script.

    cPanel.net Support Ticket Number:
     
  3. demian

    demian Member

    Joined:
    Aug 25, 2003
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Yes, I am

    Yes, I am, I think I said that in the last post =] !!
    I went to the WHM from my reseller account, and generated a number, that is really BIG !!!

    $accesshash = 'Here I paste the big number all in 1 line';

    How is the correct way to connect ?
    Does someone have the correct way to do this ? I wrote down all the information I have, can someone please give me a example of how would be the correct way using my information ?
    Because if you guys can tell me the correct way with my info, and still doesn't work, I will be able to say that the problem is with the server(administrator), not me, can someone paste a example using the information that I provided in the last post, I'm really confused ?
    I've read the manual and searched in google, but I always find the same stuffs !!
    I'm using php, so perl examples wont work for me, tks a lot !!


    Demian Escobar Fagundes

    cPanel.net Support Ticket Number:
     
  4. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    Lol, sorry I missed that line earlier, I was expecting to see the whole long string, but I guess you really dont need to (and shouldnt ) put it here anyways. According to cpanel doccumentation:

    Below is a sample PHP program:


    #!/usr/local/cpanel/3rdparty/bin/php


    <?php

    require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
    $host = "localhost";
    $user = "";
    $accesshash = '';

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

    cPanel.net Support Ticket Number:
     
  5. demian

    demian Member

    Joined:
    Aug 25, 2003
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hey man, I'm really having a problem in here, seems to me that you did not read the entire post. First you ask me if I used the hash key after I tell you I did, and now you give me the script that I already told you that I have it, and more than that, that's the one that I'm using.


    Please, I need some help on this, can someone provide me a small example using the information I provided ?

    Tks anyway

    Tks a lot you guys


    Demian Escobar Fagundes
     
    #5 demian, Aug 26, 2003
    Last edited: Aug 26, 2003
  6. demian

    demian Member

    Joined:
    Aug 25, 2003
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    fixed, tks a lot, I think the problem was with the curl in the server, I knew it ...... =]






    Tks a lot to all of you !!




    Escobar

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page