Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Aug 2003
    Posts
    10

    Unhappy Help with Remote access ??

    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. #2
    Member B12Org's Avatar
    Join Date
    Jul 2003
    Location
    Seattle Washington
    Posts
    694

    Default

    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. #3
    Member
    Join Date
    Aug 2003
    Posts
    10

    Default 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. #4
    Member B12Org's Avatar
    Join Date
    Jul 2003
    Location
    Seattle Washington
    Posts
    694

    Default

    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. #5
    Member
    Join Date
    Aug 2003
    Posts
    10

    Default

    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
    Last edited by demian; 08-26-2003 at 06:23 PM.

  6. #6
    Member
    Join Date
    Aug 2003
    Posts
    10

    Talking

    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:

Similar Threads & Tags
Similar threads

  1. not able to connect remote MySQL : Remote Database Access Hosts
    By crazyaboutlinux in forum Database Discussions
    Replies: 4
    Last Post: 10-05-2011, 03:55 PM
  2. MySQL database remote access (Access Host)
    By akot2 in forum Database Discussions
    Replies: 4
    Last Post: 12-21-2006, 09:45 AM
  3. Remote Access
    By Nivko in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-23-2006, 11:59 AM
  4. Need Remote Access
    By flash9 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-01-2004, 01:28 PM
  5. Different IP when using remote access
    By Netmaking in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-02-2004, 05:34 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube