Sorry, resellers are not permitted to create subdomains of the server's main domain

desbest

Member
Jan 7, 2009
8
0
51
The whm xml api I have says this
Sorry, resellers are not permitted to create subdomains of the server's main domain

Even when I create
Code:
[B]$result=$test->createAccount('','','','','');[/B]
Code:
	function createAccount($acctDomain,$acctUser,$acctPass,$acctEmail,$acctPackg)
	{
		//connect using prpoer xml api address
[B]		$this->connect("/xml-api/createacct?username=$acctUser&password=$acctPass&contact email=$acctEmail&plan=$acctPackg&domain=$acctDomain&ip=n&cgi=y&frontpage=y&cpmod=x3&useregns=0&reseller=0");[/B]
		//get the output
		$xmlstr=$this->getOutput();
		if($xmlstr=='')
		{
			$this->errors[]='No output.';
			return false;
		}
		//disconnect
		$this->disconnect();

		//get the output xml as an array using simple xml
		$xml = new SimpleXMLElement($xmlstr);


		if($xml->result->status==1)
		{
			$result['status']=$xml->result->status;
			$result['statusmsg']=$xml->result->statusmsg;
			$result['ip']=$xml->result->options->ip;
			$result['nameserver']=$xml->result->options->nameserver;
			$result['nameserver2']=$xml->result->options->nameserver2;
			$result['nameserver3']=$xml->result->options->nameserver3;
			$result['nameserver4']=$xml->result->options->nameserver4;
			$result['package']=$xml->result->options->package;
			$result['rawout']=$xml->result->rawout;
			return $result;
		}
		else
		{
			$this->errors[]=$xml->result->statusmsg;
			return false;
		}
	}
The output I get is

Code:
Array ( [0] => SimpleXMLElement Object ( [0] => Sorry, resellers are not permitted to create subdomains of the server's main domain ) )
Which makes no sence to me because when I create an account with no domain, or one with google.com it still fails.
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
Login to WHM and go to "Tweak Settings" and take a close look at the first section of options and I think you'll see right away the problem ;)
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
13
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
Like Spiral described, please double check the Tweak Settings page via root access to your WHM control panel. Here two related options to look for within the Domains section of the WHM Tweak Settings page:
* Allow users to park subdomains of the server's hostname main domain.
* Allow resellers to create accounts with subdomains of the server’s hostname main domain.

Related Documentation:
Tweak Settings - Domains