Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

AddonDomain::addaddondomain API Version 2, won't add a domain, keeps deleting it.

Discussion in 'cPanel Developers' started by Dekken, Mar 15, 2013.

  1. Dekken

    Dekken Registered

    Joined:
    Mar 15, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Hello,

    So I seem to be having some troubles with the AddonDomain::addaddondomain function.
    This is how I call it:

    PHP:
    api2_query($this->cpanelUser"AddonDomain""addaddondomain", array('dir' => $this->dir'subdomain' => $this->subdomain'domain' => $this->domain);
    And the error that I get is:
    Code:
      <cpanelresult>
        <apiversion>2</apiversion>
        <data>
          <reason>Deleted domain: sub.domain.com
    Bind reloading on marge using rndc zone: [domain.com]
    The subdomain, sub.domain.com has been removed.</reason>
          <result>1</result>
        </data>
        <event>
          <result>1</result>
        </event>
        <func>addaddondomain</func>
        <module>AddonDomain</module>
      </cpanelresult>
    A folder is being created in the public_html direcotry, but nothing else.
    I am able to call other functions like delete and list just fine, but this one seems to be causing problems.
    I have searched all over the place and could not find a valid solution.

    Thanks!
     
  2. s.a.

    s.a. Active Member
    PartnerNOC

    Joined:
    Aug 16, 2007
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    Toronto, Canada
    Subdomain variable has to be "sub", not "sub.domain.com".
     
  3. adman_9000

    adman_9000 Registered

    Joined:
    Apr 19, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    I have the same problem. The only solution I have found by googling does not apply to me but it may work for you..

    You are trying to add a domain which does not resolve to your server and do not have the correct settings to allow this in WHM (Tweak settings -> Domains -> Allow Remote Domains). It is therefore adding the domain, finding it doesn't resolve to your server and removing it.

    As I say this is the only solution I have found but in my case I have this setting turned on as well as having the add-on domain and subdomain resolve to my server and am still getting the error..


    <cpanelresult>
    <apiversion>2</apiversion>
    <data>
    <reason>Deleted domain: sub.main-domain.com
    Bind reloading on myserver1 using rndc zone: [main-domain.com]
    The subdomain, sub.main-domain.com has been removed.</reason>
    <result>1</result>
    </data>
    <event>
    <result>1</result>
    </event>
    <func>addaddondomain</func>
    <module>AddonDomain</module>
    </cpanelresult>


    The subdomain variable is sent as 'sub', it only returns the full subdomain in the error.
     
Loading...
Similar Threads - AddonDomain addaddondomain Version
  1. durangod
    Replies:
    5
    Views:
    3,699

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice