Irritum

Member
Feb 7, 2011
5
0
51
Hello, i'm new to cPanel and am facing some troubles. The first one is when i try to add addon domain trhough a web interface, i get the folowing answer: "Error from park wrapper: Using nameservers with the following IPs: ............. Sorry, the domain is already pointed to an IP address that does not appear to use DNS servers associated with this server. Please transfer the domain to this servers nameservers or have your administrator add one of its nameservers to /etc/ips.remotedns and make the proper A entries on that remote nameserver."
It's like that. My company has a domain - domainai.lt which we use for testing. Other guy pointed it to that server where cPanel is and created some accounts on it, for example arunas.domainai.lt (all of them are third level domains and none is on domainai.lt). So basically what i'm trying to do is to add addon domain like arunelis.domainai.lt and what i get is that error message.

The other problem i'm facing is when i'm trying to add addon domain through xml api. I'm getting this message:
Code:
" 2
   
      Removed muhahahasdasd.irritum.domainai.lt Server at line: 447.
Removed Entry from httpd.conf
Bind reloading on cpanel using rndc zone: [irritum.domainai.lt]
The subdomain, muhahahasdasd.irritum.domainai.lt has been removed."
I've read that here might be some problems with dns entries left somewhere, but then, if i would try to add other domain, like pavizdys.domainai.lt it should work, shouldn't it? But it still throws same error.


My source code is like here:
Code:
$query="https://<my-server and port>/xml-api/cpanel?user=irritum&cpanel_xmlapi_module=AddonDomain&cpanel_xmlapi_func=addaddondomain&cpanel_xmlapi_version=2&newdomain=muhahahasdasd.domainai.lt&dir=public_html/&pass=arunas123&subdomain=muhahahasdasd";
$curl=curl_init();

  //                                                         # Create
//Curl Object
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,0);

                         # Allow certs that do not match the domain
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,0);

                         # Allow self-signed certs
curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);

                         # Return contents of transfer on curl_exec
$header[0] = "Authorization: WHM $whmusername:" .
preg_replace("'(\r|\n)'","",$whmhash);        # Remove newlines from the hash
curl_setopt($curl,CURLOPT_HTTPHEADER,$header);

                 # Set curl header
curl_setopt($curl, CURLOPT_URL, $query);

                                         # Set your URL
$result = curl_exec($curl);
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello Irritum,

For the first issue, if you could enable these in WHM > Tweak Settings, then you should no longer receive the error message of "Sorry, the domain is already pointed to an IP address that does not appear to use DNS servers associated with this server. Please transfer the domain to this servers nameservers or have your administrator add one of its nameservers to /etc/ips.remotedns and make the proper A entries on that remote nameserver." any longer:

Allow Remote Domains [?]
Allow creation of parked/addon domains that resolve to other servers (e.g. domain transfers) This can be a major security problem. If you must have it enabled, be sure not to allow users to park common Internet domains.

Allow unregistered domains [?]
Allow creation of parked/addon domains that are not registered.
Simply change both of these options to "On", and then click the "Save" button in Tweak Settings area.

I will let one of our API specialists handle the API question.

Thanks.
 

vimaljoseph

Registered
Mar 20, 2012
1
0
51
cPanel Access Level
Website Owner
Hi,

I tried the drupal module mentioned above to create an addon domain via php. But the addon domain is not get created.
Here is the message I get.

input is: string(228) "http://cccc.com:2082/xml-api/cpanel?cpanel_xmlapi_user=cccc&cpanel_xmlapi_module=AddonDomain&cpanel_xmlapi_func=addaddondomain&cpanel_xmlapi_version=2&dir=public_html%2Fdomains%2F10&newdomain=abc.com&subdomain=abc" output is: string(424) " 2 Deleted domain: abc.cccc.com Bind reloading on host using rndc zone: [cccc.com] The subdomain, abc.cccc.com has been removed. 1 1 addaddondomain AddonDomain "

The Allow Remote Domains and Allow unregistered domains are already on.

Is it necessary to create ftp account to add a addondomain via api?