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.

createacct() messing up

Discussion in 'cPanel Developers' started by kgp43, Jun 15, 2009.

  1. kgp43

    kgp43 Active Member

    Joined:
    Aug 25, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    Have been trying to find the reason for this error, for like 4-5 hours now but no result and it's starting to drive me insane.

    I use the following to automatically create an cpanel account on an remote server, but keep getting this error:

    Notice: Undefined variable: cpanelaccterr in /usr/local/cpanel/Cpanel/Accounting.php.inc on line 34


    Script:

    $serveruser = "nwcom";
    $serverip = "111.222.333.444";
    $accesskey =
    "814587212b7700e403e5eeb00089d690
    f533808f872a333829690ab56438f930
    eaca44e46d17bf099eec267ba573df07
    44cfc24904ce519f2547d48e6bd210f9
    11fec9b7238092ff12e28dec7791fb5e
    475d29026dd0e4cacab7ecf4d583e011
    8d9d77ba3d42e8455755c60ffbcfff6b
    51b544372de41e851ad86aa51e7e714e
    e62286b55512f60e26aa417015fa3725
    e26521609f9ccb0d2485bb4ceafcff9c
    fd05c2eec18fe1b69f3cad16277d677e
    756d778e8f6d82d196ee91fb83b2bb69
    749f9a6ca273eb8e5b900d826c796359
    d2e2c074b2747da2f8f930be8b0f45b4
    64e43d9a689208553035b1278cd4c539
    ddf970a5f64e8ddd34a6ca7d14742ac7
    98079d3f0ea78c30c9f5f4ab1ccac691
    82ad7e9919329fe55343e174d8e54c84
    e339467b0bba97421073a3c3a1946913
    2b126f5255df9af2c91f151034f88bba
    8d4b4802bd7206b83d057acc07f755a6
    9d30e737c60734d92017ae8b633b0ee0
    2c9655de0253fb6b36638354f0588e9e
    f7771e6fc1c9e5618f8055ba2708212e
    4b73fc80e881bdbfcec5304d6e46a3d2
    430d4610ceea537339d128604087a75f
    58a3809d88f2e97bf1375d88332eeebe
    55e12fde140563d55fa46cc040cf6dec
    a4fe6150bc87190903771bfc9a7ba1a1";

    $acctdomain = "mytestdomain.com";

    $usessl = false;
    $acctuser = "jhf6f";
    $acctpass = "asd2ds";
    $acctplan = "nwcom_default";

    // Create the new domain/account
    $status = createacct($serverip,$serveruser,$accesskey,$usessl,$acctdomain,$acctuser,$acctpass,$acctplan);
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
  3. kgp43

    kgp43 Active Member

    Joined:
    Aug 25, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    I'm not into classes etc, not skilled enough for that yet.
    Know why the above isnt working? Have been using something similar a few years back, without problems.
     
  4. kgp43

    kgp43 Active Member

    Joined:
    Aug 25, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Found the error, my host does not allow me to use the cpanel function - security risk they say.
    ('/usr/local/cpanel/Cpanel/Accounting.php.inc')

    :(
     
  5. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If you look at the thread that ken linked to, that class has the exact example of creating an account in it. But if you have to use that file, you may want to ask you host for a copy or copy it into your homedir.
     

Share This Page