#1  
Old 18th October 2011, 20:00
laptop_user laptop_user is offline
Member
 
Join Date: Aug 2011
Posts: 88
Thanks: 39
Thanked 8 Times in 8 Posts
Default Get DNS zone from admin

Hello,

How can I retrieve DNS zone from admin? Using dns_zone_get and dns_zone_get_by_user function give me the same permission error:

Code:
permission_deniedYou do not have the permissions to access this function. SOAP Error: You do not have the permissions to access this function.

Also in dns_zone_get help file - remoting_client/API-docs/dns_zone_get.html
Code:
Input Variables:

$session_id, $primary_id

but in the example php file - dns_zone_get.php
Code:
$id = 1;
	
	$dns_record = $client->dns_zone_get($session_id, $id);

	print_r($dns_record);
I change $id to $primary_id but I'm not sure what admin value should I put there?

Any help is appreciated. Thank you.
Reply With Quote
Sponsored Links
  #2  
Old 18th October 2011, 21:32
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,981
Thanks: 825
Thanked 5,371 Times in 4,218 Posts
Default

Which ispconfig version do you use?

The error abvove means that the function that you try to use is not enabled for the remote user that you used to access the server.

Quote:
I change $id to $primary_id but I'm not sure what admin value should I put there?
The sample function is correct. By changing the variable, you made the function fail s $primary_id is not set in the example function. The name of a variable does not matter, what matter is onle the value inside the variable, and this value is set to 1 in the example function and has to be set to the primary ID value of the record that you want to retrieve
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 18th October 2011, 23:18
laptop_user laptop_user is offline
Member
 
Join Date: Aug 2011
Posts: 88
Thanks: 39
Thanked 8 Times in 8 Posts
Default

Quote:
Originally Posted by till View Post
Which ispconfig version do you use?

The error abvove means that the function that you try to use is not enabled for the remote user that you used to access the server.
I turns out I don't activate the DNS zone function for this remote user. This permission problem is solved. I now have other problem. How to get all DNS zone in my database?

Using dns_zone_get_by_user.php for the client it works. All domain under client is shown. but not for the admin. I put in there:

Code:
	//* Set the function parameters.
	$client_id = 0;
	$server_id = 1;
Nothing is echo out. Actually this admin don't add any DNS zone so I think no zone will be shown. Is that why? Is there anyway I could output all zones like just when admin login to ISPC and click DNS >> Zones he will see all his client zones?
Reply With Quote
  #4  
Old 19th October 2011, 09:51
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,981
Thanks: 825
Thanked 5,371 Times in 4,218 Posts
 
Default

The admin is not a client, so the function will not return anything when you query zones by client.

There is no function to get all zones from all clients in the api yet, as you can see in the api docs. If you like to have such a function in future releases, then make a feature request in the bugtracker.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
laptop_user (20th October 2011)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New domains not added to Bind9 DNS DKLeader Installation/Configuration 15 15th January 2011 21:11
Polish translation lucani Developers' Forum 0 17th September 2010 21:35
HELP DNS and DHCP I AM LOST krisarmstrong Server Operation 0 18th August 2009 23:27
Google Apps dayjahone General 19 29th March 2008 17:25
DNS Zone Transfer not complete. joelee HOWTO-Related Questions 3 19th August 2007 14:55


All times are GMT +2. The time now is 13:38.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.