Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function addsubdomain running twice #31

Open
mazzucode opened this issue Nov 14, 2016 · 0 comments
Open

Function addsubdomain running twice #31

mazzucode opened this issue Nov 14, 2016 · 0 comments

Comments

@mazzucode
Copy link

When i run the below code, xmlapi-php is running twice.

    require_once('../xmlapi.php');

    $cpanelUser = 'user';
    $cpanelPass = 'password';

    $XmlApi = new xmlapi('127.0.0.1');
    $XmlApi->set_port(2083);
    $XmlApi->password_auth($cpanelUser, $cpanelPass);
    $XmlApi->set_debug(1);

    $result = $XmlApi->api2_query($cpanelUser, 'SubDomain', 'addsubdomain', [
        'domain'      => 'marcio',
        'rootdomain'  => 'evoimobdev.com.br',
        'dir'         => '/usersite/marcio/public_html'
    ]);

So i get this result:

[14-Nov-2016 16:53:02 America/Sao_Paulo] URL: https://127.0.0.1:2083/xml-api/cpanel
[14-Nov-2016 16:53:02 America/Sao_Paulo] DATA: domain=marcio&rootdomain=evoimobdev.com.br&dir=%2Fusersite%2Fmarcio%2Fpublic_html&cpanel_xmlapi_user=imobevodev&cpanel_xmlapi_module=SubDomain&cpanel_xmlapi_func=addsubdomain&cpanel_xmlapi_apiversion=2
[14-Nov-2016 16:53:02 America/Sao_Paulo] Authentication Header: Authorization: Basic **hidden**


[14-Nov-2016 16:53:02 America/Sao_Paulo] RESPONSE:
 <?xml version="1.0" ?>
  <cpanelresult>
	<apiversion>2</apiversion>
	<data>
	  <reason>The subdomain “marcio.evoimobdev.com.br” has been added.</reason>
	  <result>1</result>
	</data>
	<event>
	  <result>1</result>
	</event>
	<func>addsubdomain</func>
	<module>SubDomain</module>
  </cpanelresult>

[14-Nov-2016 16:53:02 America/Sao_Paulo] SimpleXML var_dump:
SimpleXMLElement Object
(
	[apiversion] => 2
	[data] => SimpleXMLElement Object
		(
			[reason] => The subdomain “marcio.evoimobdev.com.br” has been added.
			[result] => 1
		)

	[event] => SimpleXMLElement Object
		(
			[result] => 1
		)

	[func] => addsubdomain
	[module] => SubDomain
)

[14-Nov-2016 16:53:04 America/Sao_Paulo] URL: https://127.0.0.1:2083/xml-api/cpanel
[14-Nov-2016 16:53:04 America/Sao_Paulo] DATA: domain=marcio&rootdomain=evoimobdev.com.br&dir=%2Fusersite%2Fmarcio%2Fpublic_html&cpanel_xmlapi_user=imobevodev&cpanel_xmlapi_module=SubDomain&cpanel_xmlapi_func=addsubdomain&cpanel_xmlapi_apiversion=2
[14-Nov-2016 16:53:04 America/Sao_Paulo] Authentication Header: Authorization: Basic **hidden**


[14-Nov-2016 16:53:04 America/Sao_Paulo] RESPONSE:
 <?xml version="1.0" ?>
  <cpanelresult>
	<apiversion>2</apiversion>
	<data>
	  <reason>(XID y945bg) A DNS entry for the domain “marcio.evoimobdev.com.br” already exists.</reason>
	  <result>0</result>
	</data>
	<error>(XID y945bg) A DNS entry for the domain “marcio.evoimobdev.com.br” already exists.</error>
	<event>
	  <result>1</result>
	</event>
	<func>addsubdomain</func>
	<module>SubDomain</module>
  </cpanelresult>

[14-Nov-2016 16:53:04 America/Sao_Paulo] SimpleXML var_dump:
SimpleXMLElement Object
(
	[apiversion] => 2
	[data] => SimpleXMLElement Object
		(
			[reason] => (XID y945bg) A DNS entry for the domain “marcio.evoimobdev.com.br” already exists.
			[result] => 0
		)

	[error] => (XID y945bg) A DNS entry for the domain “marcio.evoimobdev.com.br” already exists.
	[event] => SimpleXMLElement Object
		(
			[result] => 1
		)

	[func] => addsubdomain
	[module] => SubDomain
)

Someone knows why xmlapi-php is running twice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant