Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    gic
    gic is offline
    Member
    Join Date
    Jun 2002
    Posts
    69

    Default Accounting.php

    If you use this, what does it return? How would I write the following in php.

    Create an account and if the account creation failed, tell the uesr what happened. Otherwise, continue to another page (named page2.php). Thanks

  2. #2
    Member
    Join Date
    Jun 2002
    Location
    UK
    Posts
    152

    Default

    Hi,
    PHP Code:
    require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
        
    $host "localhost";
        
    $user "user";
        
    $accesshash 'ACCESSHASH';    
        
    $usessl "1";
    $do createacct($host,$user,$accesshash,$usessl,$acctdomain,$acctuser,$acctpass,$acctplan);
    if (!
    eregi("wwwacct creation finished",$do)){ 
    echo 
    "There has been a problem with your account creation!<br>Please contact support for help!";
    }
    else
    {
    Header("Location: success.html");

    hope this helps,
    Thanks

  3. #3
    gic
    gic is offline
    Member
    Join Date
    Jun 2002
    Posts
    69

    Default

    And then just fill in the other info like username, acctplan, etc with those values and I'm set?

  4. #4
    Member
    Join Date
    Jun 2002
    Location
    UK
    Posts
    152

    Default

    Yep,
    the only other values you need are:
    $acctdomain
    $acctuser
    $acctpass
    $acctplan
    Thanks

  5. #5
    Member
    Join Date
    Jun 2003
    Posts
    396

    Default I get error with this one

    I am using the code you mention but I get:
    There has been a problem with your account creation!
    Please contact support for help!
    I checked my plan and it is right.

    The test script works to display the accounts so the login portion is working. Just not creating the account.

    cPanel.net Support Ticket Number:
    -Albert

  6. #6
    Member
    Join Date
    Jan 2002
    Location
    UK
    Posts
    248

    Default Re: I get error with this one

    Originally posted by asmithjr
    I am using the code you mention but I get:


    I checked my plan and it is right.

    The test script works to display the accounts so the login portion is working. Just not creating the account.

    cPanel.net Support Ticket Number:
    Create an account manually in WHM and verify it is actually working.

    cPanel.net Support Ticket Number:

Similar Threads & Tags
Similar threads

  1. accounting.php.inc
    By Claus in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 05-16-2008, 01:33 PM
  2. Accounting.php.inc where to get?
    By oszone in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-08-2006, 05:17 AM
  3. Accounting.inc.php
    By nvez in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-17-2006, 05:00 PM
  4. PHP accounting
    By dhrx in forum cPanel and WHM Discussions
    Replies: 19
    Last Post: 02-26-2004, 10:49 AM
  5. Accounting.php.inc
    By nybble in forum cPanel and WHM Discussions
    Replies: 11
    Last Post: 02-13-2004, 09:51 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube