Results 1 to 3 of 3

Thread: Having problem with calling Api2 Module:ZoneEdit

  1. #1
    Registered User
    Join Date
    Aug 2012
    Posts
    2
    cPanel/WHM Access Level

    Website Owner

    Default Having problem with calling Api2 Module:ZoneEdit

    Hello , im currently trying to call api2 module ZoneEdit function remove/add_zone_record but im getting the following error:
    [ZoneEdit::remove_zone_record ] Encountered error in ZoneEdit::remove_zone_record : API2: Could not locate function Cpanel::ZoneEdit::api2_remove_zone_record !
    _______________________________________________________________
    Encountered error in ZoneEdit::add_zone_record : API2: Could not locate function Cpanel::ZoneEdit::api2_add_zone_record !
    warn [cpanel] Unable to run [Cpanel::ZoneEdit::api2_remove_zone_record (2/8)]; () at /usr/local/cpanel/Cpanel/Api2/Exec.pm line 115
    __________________________________________________
    I've tried this little plugin in an older cpanel version it worked , without problems to add and remove zone records .
    Currently im testing this on the latest cpanel version : 11.32.3 (build 23) and im getting those errors .
    Could you gimme some orientation , what can i be doing wrong ?
    I am testing this with normal account , that have DNS editors (simple/advanced) enabled . Yet in my plugin i cant execute those commands .

    I am using livephp for calls .
    A view of my call :
    $cpanel = new CPANEL();
    $cpanel->api2('ZoneEdit','remove_zone_record ',array("domain"=>"$domain","line"=>"$line"));
    $cpanel->api2('ZoneEdit','add_zone_record',array("domain"=>"$domain","name"=>"$newrecord_name","type"=>"$type","ttl"=>"$ttl","$address_var"=>"$address","class"=>"IN"));

    Thanks in advance.

  2. #2
    Registered User
    Join Date
    Aug 2012
    Posts
    2
    cPanel/WHM Access Level

    Website Owner

    Default Re: Having problem with calling Api2 Module:ZoneEdit

    bumpszeeers

  3. #3
    Member This forum account has been confirmed by cPanel staff to represent a vendor. KostonConsulting's Avatar
    Join Date
    Jun 2010
    Location
    Austin, TX
    Posts
    154
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Having problem with calling Api2 Module:ZoneEdit

    Quote Originally Posted by mysteryosly View Post
    Code:
    $cpanel->api2('ZoneEdit','remove_zone_record ',array("domain"=>"$domain","line"=>"$line"));
    You need to remove the trailing space in the name of the function.

    Code:
    'remove_zone_record '
    should be

    Code:
    'remove_zone_record'
    Dave Koston
    Koston Consulting
    http://www.kostonconsulting.com

Similar Threads

  1. Load DBI in API2 Module
    By cyon in forum cPanel Developers
    Replies: 6
    Last Post: 11-06-2010, 09:37 AM
  2. API2 'delpop' problem
    By bmett in forum cPanel Developers
    Replies: 3
    Last Post: 08-09-2010, 07:01 PM
  3. API2 - Parking Domain Problem
    By eddit in forum cPanel Developers
    Replies: 1
    Last Post: 07-05-2010, 11:41 AM
  4. Calling API1 functions from a custom Cpanel module
    By RSimoes in forum cPanel Developers
    Replies: 1
    Last Post: 01-27-2010, 06:44 PM
  5. Problem calling createacct() inside another function.
    By HostSauce in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 03-28-2006, 04:25 PM