Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Aug 2004
    Posts
    30

    Default createacct() messing up

    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. #2
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Since you are using PHP, you may want to use the class Matt put together here:

    http://forums.cpanel.net/f42/xmlapi-...ss-111897.html
    Kenneth
    Product Manager
    cPanel, Inc.

  3. #3
    Member
    Join Date
    Aug 2004
    Posts
    30

    Default

    Quote Originally Posted by cpanelkenneth View Post
    Since you are using PHP, you may want to use the class Matt put together here:

    http://forums.cpanel.net/f42/xmlapi-...ss-111897.html
    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. #4
    Member
    Join Date
    Aug 2004
    Posts
    30

    Default

    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. #5
    cPanel Staff cPanelMatt's Avatar
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    409

    Default

    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.
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

Similar Threads & Tags
Similar threads

  1. Fedora 12 messing up
    By nitation in forum cPanel and WHM Discussions
    Replies: 12
    Last Post: 08-11-2010, 03:08 AM
  2. createacct() messing up
    By kgp43 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-15-2009, 09:05 AM
  3. Webmail messing up attachments
    By dnevins in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 02-14-2006, 03:53 PM
  4. Apache is messing with my belly - only me?
    By bjarne in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-21-2004, 07:18 AM
  5. Frontpage is messing up!
    By nightscream in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-28-2003, 04:30 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube