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.

Accounting.php.inc

Discussion in 'General Discussion' started by nybble, Feb 10, 2004.

  1. nybble

    nybble Well-Known Member

    Joined:
    Jan 26, 2004
    Messages:
    223
    Likes Received:
    0
    Trophy Points:
    16
    I was looking at scripts that add accounts to cpanel and stuff, the example cpanel.net gives has a require Accountsing.php.inc... small question, what is accounting.php.inc? is it unique to each server? I want my script to be pretty stand alone and not require it to be run on a cpanel server for example, cay anyone help me out? is there a way to interface with WHM without using accounting.php.inc?
     
  2. Maxian

    Maxian Registered

    Joined:
    Feb 10, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Same question
     
  3. nybble

    nybble Well-Known Member

    Joined:
    Jan 26, 2004
    Messages:
    223
    Likes Received:
    0
    Trophy Points:
    16
    Ahh, never mind guys :)

    I just got it off my server

    I would post a link for a download, but - In the cpanel licence it says I can not distribute cpanel files. Sorry guys

    A few FAQ's

    Is accounting.php.inc unique to each server? - No
    Does it need to be on the server? Can you just include it in the script? - You can just include it (It has no requirements)
    What is accounting.php.inc? - Its just simple functions, its not like you even need it to make a remote interface script but it will save you some time, its a list of simple functions :)
     
    #3 nybble, Feb 10, 2004
    Last edited: Feb 10, 2004
  4. Maxian

    Maxian Registered

    Joined:
    Feb 10, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    But since im on a reseller do I need to include it (as I dont have access to include it in PHP) or how can I get around that?
     
  5. nybble

    nybble Well-Known Member

    Joined:
    Jan 26, 2004
    Messages:
    223
    Likes Received:
    0
    Trophy Points:
    16
    Well, it works with reseller accounts (I've tested it)

    You can just include it off the server, or I can send you my copy of the file pending what Nick says, Nick - Can I give this user the file?

    Or you can ask your host to get it for you :)
     
  6. Maxian

    Maxian Registered

    Joined:
    Feb 10, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I managed to get my hands on it... but when I try and run a script it gives me a ACCESS DENIED... I am not including the script as root though... so I am confused
     
  7. nybble

    nybble Well-Known Member

    Joined:
    Jan 26, 2004
    Messages:
    223
    Likes Received:
    0
    Trophy Points:
    16
  8. drunkn_munky

    drunkn_munky Member

    Joined:
    Jan 31, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    So if I get this acounting.php.inc do i still need to install easyapache or something
     
  9. nybble

    nybble Well-Known Member

    Joined:
    Jan 26, 2004
    Messages:
    223
    Likes Received:
    0
    Trophy Points:
    16
    Well.. yes, unless you use a CLI type setup, the accounting.php.inc is just a list of functions, its not like its even a huge file..... one example

    PHP:
    function unsuspend ($host,$user,$accesshash,$usessl,$suspenduser) {      $result whmreq("/scripts/remote_unsuspend?user=${suspenduser}",$host,$user,$accesshash,$usessl);      if ($cpanelaccterr != "") { return; }      return $result;  }

    So, its just like.... well, it makes sence of the features that you can use to add/remove accounts, for example createaccount($username, or how ever it goes)

    Anyway, yeah, if you get a hold of it you can look at the code and get a good idea of how to interface with WHM
     
  10. drunkn_munky

    drunkn_munky Member

    Joined:
    Jan 31, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for that. Its a shame that I just found the script I was looknig for when I had pursuaded my host to install easyapache.

    Thanks anyway and I might use that script instead because it look like their are for options
     
  11. nybble

    nybble Well-Known Member

    Joined:
    Jan 26, 2004
    Messages:
    223
    Likes Received:
    0
    Trophy Points:
    16
    The best of luck to you
     
  12. drunkn_munky

    drunkn_munky Member

    Joined:
    Jan 31, 2004
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    thanks! my script is getting quite good! I'm going to let people use it for free, but it will hardly match up to NiXT :(
     
Loading...

Share This Page