Cmd_db

Marckus_e

Verified User
Joined
Feb 18, 2004
Messages
36
Location
Sweden
Hi!

Do i need to use the domain value when sending data or is it enough to use only the rest?

name, username and password that is.

Best regards
Marcus
 
I am trying to create a db with my user

and i get

The request you've made cannot be executed because it does not exist in your authority level

Code

$sock = new HTTPSocket;

$sock->connect('ssl://ipnumber',2222);
$sock->set_login($dauser,$dapwd);

$sock->set_method('POST');

$sock->query('/CMD_API_DB',
array('action' => 'create',
'name' => $slices[2],
'user' => $dauser,
'passwd' => $dapwd,
'passwd2' => $dapwd2
));
$result = $sock->fetch_body();
 
Actually, yes, that's a problem. Maybe we can get John to fix this for the next version - Users should be able to manipulate themselves using any applicable APIs.

This is what I'm using in iTron: $socket->set_login("{admin}|{user}","{admin_passwd}");
 
Yes, say we have an admin named super (whose password is cheese) and a user named frank.

We'd use: super|frank:cheese
 
$sock->set_login('admin|user,'adminpwd');

That is correct right?

Still getting error.

Best regards
Marcus
 
Yeah, I meant super|frank:cheese as:

$obj->set_login("super|frank","cheese");
 
Problems,

i have changed to CMD_API_DATABASES, have the correct login ('admin|user','adminpwd') and all the values that are needed and still get The request you've made cannot be executed because it does not exist in your authority level

$sock = new HTTPSocket;

$sock->connect('ssl://ipnumber',2222);
$sock->set_login('admin|user','adminpwd');

$sock->set_method('POST');
$sock->query('/CMD_API_DATABASES',

array('action' => 'create',
'name' => $slices[2],
'user' => $dauser,
'passwd' => $dapwd,
'passwd2' => $dapwd ));

$result = $sock->fetch_body();
echo $result;

Also tried the username, usrpwd but no difference.

Best regards
Marcus
 
Last edited:
Any ideas?

I have tried all kinds of different logins and changes but doesn't work so far.

Best regards
Marcus
 
It doesn't create the DB then, if i echo the result i get

Error: document not found

i removed the / before CMD_API_DATABASES

Best regards
Marcus
 
Thanks, Runnign 1.21.0 .. Will tell the admin to update that tomorrow!

Sorry for the problems i have been dragging up here..

THanks for the fast help!

Best regards
Marcus
 
Back
Top