Closed p2107 closed 6 years ago
Hallo, same problem here.
@tuxis-ie Is there any kind of debug output so i may can look into the issue?
Best regards margau
Same problem here.
Same here as well
https://github.com/tuxis-ie/nsedit/blob/master/includes/class/ApiHandler.php#L71 is where the magic happens. So you can debug some stuff there.
Calling zones.php directly (use inspector in your browser to see which calls are made) might give some useful output then.
Try this:
--- ApiHandler.php 2018-03-28 07:36:21.833684298 -0500
+++ ApiHandler-fixed.php 2018-03-28 07:37:07.093835996 -0500
@@ -29,15 +29,19 @@
private function apiurl() {
$tmp = new ApiHandler();
- $tmp->url = '/api';
+ $tmp->url = '/api/v1/servers/localhost';
$tmp->go();
-
- if ($tmp->json[0]['version'] <= 1) {
- $this->apiurl = $tmp->json[0]['url'];
+ $v = intval(substr($tmp->json["version"],0,1));
+ if ($v == 4) {
+ $this->apiurl = $tmp->json["url"];
} else {
throw new Exception("Unsupported API version");
}
-
}
private function curlopts() {
--- PdnsApi.php 2018-03-28 07:36:21.833684298 -0500
+++ PdnsApi-fixed.php 2018-03-28 07:40:13.762461478 -0500
@@ -11,7 +11,7 @@
$api = clone $this->http;
$api->method = 'GET';
if ($q) {
- $api->url = "/servers/localhost/search-data?q=*".$q."*&max=25";
+ $api->url = "/search-data?q=*".$q."*&max=25";
$api->call();
$ret = Array();
$seen = Array();
@@ -28,7 +28,7 @@
return $ret;
}
- $api->url = "/servers/localhost/zones";
+ $api->url = "/zones";
$api->call();
return $api->json;
@@ -37,7 +37,7 @@
public function loadzone($zoneid) {
$api = clone $this->http;
$api->method = 'GET';
- $api->url = "/servers/localhost/zones/$zoneid";
+ $api->url = "/zones/$zoneid";
$api->call();
return $api->json;
@@ -46,7 +46,7 @@
public function exportzone($zoneid) {
$api = clone $this->http;
$api->method = 'GET';
- $api->url = "/servers/localhost/zones/$zoneid/export";
+ $api->url = "/zones/$zoneid/export";
$api->call();
return $api->json;
@@ -64,7 +64,7 @@
if (!isset($zone['serial']) or gettype($zone['serial']) != 'integer') {
$api->method = 'POST';
- $api->url = '/servers/localhost/zones';
+ $api->url = '/localhost/zones';
$api->content = json_encode($zonedata);
$api->call();
@@ -88,7 +88,7 @@
public function deletezone($zoneid) {
$api = clone $this->http;
$api->method = 'DELETE';
- $api->url = "/servers/localhost/zones/$zoneid";
+ $api->url = "/zones/$zoneid";
$api->call();
return $api->json;
@@ -98,7 +98,7 @@
$ret = array();
$api = clone $this->http;
$api->method = 'GET';
- $api->url = "/servers/localhost/zones/$zoneid/cryptokeys";
+ $api->url = "/zones/$zoneid/cryptokeys";
$api->call();
Did anyone get it working?
On Thu, 2018-04-12 at 07:20 +0000, skf82 wrote:
Did anyone get it working?
Didn't Pauls suggestion help you?
-- Kerio Operator in de Cloud? https://www.kerioindecloud.nl/ Mark Schouten | Tuxis Internet Engineering KvK: 61527076 | http://www.tuxis.nl/ T: 0318 200208 | info@tuxis.nl
Could someone post how to patch these files? I tried this: patch foo.c < patch.diff
But that fails on line 23 for the ApiHandler.php file. It runs fine on the PdnsApi.php file.
I fixed this issue by redownloading from master and reusing the config.inc.php
nsedit does not work after upgrade from pdns 4.0 to 4.1 I get API error 404 not found when edit or create zone/record. Is there some fix?