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. not working

Discussion in 'General Discussion' started by wisperusa, Aug 2, 2005.

  1. wisperusa

    wisperusa Registered

    Mar 14, 2005
    Likes Received:
    Trophy Points:
    Having trouble getting to work. My perl script is something like the one at the end of this message. I can see the traffic going over the wire; an exchange is taking place, but nothing happens, $whm->{err} is not set, and nothing is output. It doesn't matter whether I'm listing, creating, suspending accts... whatever. Doesn't do anything.

    First of all, is my accesshash set correctly? The "howto" guides on the site say to paste directly as it is from WHM. WHM says not to include BEGIN and END lines. Neither of the ways that I tried it below work.

    Can anyone offer advice?

    Thanks a lot!

    #!/usr/bin/perl -w

    use Cpanel::Accounting;
    use Data::Dumper;

    my $whm = Cpanel::Accounting->new();

    $whm->{host} = "";
    $whm->{user} = "myreselleruser";
    #$whm->{accesshash} = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaetc";
    $whm->{accesshash} =

    my %ACCTS = $whm->listaccts();

    if ($whm->{error} ne "") {

    print "There was an error while processing your request: Cpanel::Accounting returned [$whm->{error}]\n";



    print Dumper(%ACCTS);

Share This Page