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.

Whm remote acess.

Discussion in 'General Discussion' started by shabda, Apr 10, 2006.

  1. shabda

    shabda Registered

    Joined:
    Apr 10, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Trying to use WHM remote access functions I read this http://www.cpanel.net/remoteaccess-php.html.
    Ill just copy it
    Code:
    #!/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);
    ?>
    
    Where can I get the file /usr/local/cpanel/Cpanel/Accounting.php.inc .
    Since I am on a shared computer with no shell access I cannot copy it.
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    You would have to ask your host to make a copy for you and put it in your directory.

    It will then only work if your host gives your reseller account the privileges required to generate a remote access key.
     
  3. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    You don't need to copy it to include it! But if you want to copy it so you can look at it, try:
    PHP:
    <?php system("cp /usr/local/cpanel/Cpanel/Accounting.php.inc ."); ?>
     
  4. shabda

    shabda Registered

    Joined:
    Apr 10, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    My PHP is quite poor so this might be a newbie question.
    Can I use
    Code:
    require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
    
    instead of
    Code:
    require 'some/relative/path.php.inc";
    
     
  5. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    Absolutely you can use an absolute path in an include. Without PHP security options turned on it works perfectly.

    I don't know whether any of the PHP security options may affect it, it's worth trying to see if it works on your server.
     
  6. shabda

    shabda Registered

    Joined:
    Apr 10, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Ok ill check it. Thanks all.
     
  7. Samxm

    Samxm Member

    Joined:
    May 29, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    And what about arguments for remote accounting functions?

    And what about arguments for remote accounting functions? I just wonder of how hard to find anything about whm remote accounting... :eek: Does anybody have a link to some online tutorial(or any info)?

    Is it possible to set number of months for remote hosting order by 'createacct' function with some argument?




    Please help!
     
    #7 Samxm, May 30, 2006
    Last edited: May 30, 2006
  8. Samxm

    Samxm Member

    Joined:
    May 29, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    I'm looking for any info about 'createacct' function!
    Plz, help!
     
  9. ConfuzzledDuck

    Joined:
    Mar 28, 2005
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
Loading...

Share This Page