listdbs api succeed with no data.
Hi,
I use api calls to list databases of accounts. the listdbs call working for all cpanel account without problem except one account., in this account give me succesfull message(result => 1) but with null in data.( no databases inside). the account (wideserv) has databases(over 20).
my code
[PHP]
$ip = "148.251.XXX.XXX"; //change it for security resons
$root_pass="xxxxxxxxxx"; //same
$xmlapi = new xmlapi($ip);
$xmlapi->password_auth("root", $root_pass);
$xmlapi->set_debug(1);
$xmlapi->set_output('array');
$db = $xmlapi->api1_query($_SESSION["domain">, "Mysql", "listdbs");
[/PHP]
if i set $_SESSION["domain">="widetesting" or whatever domain of our server we take back the listdbs result
lets set now $_SESSION["domain">="wideserv" . the account with the listing problem. result
The query not failing but not give me the result of this, and only this account. if i change $_SESSION["domain"> to an account name that not exist, lets say "mpampatsa" it will give me an error
Thx for your time.
GNU nano 2.0.9 File: out.txt
array(7) {
["module">=>
string(5) "Mysql"
["func">=>
string(7) "listdbs"
["type">=>
string(5) "event"
["source">=>
string(8) "internal"
["apiversion">=>
string(1) "1"
["data">=>
array(1) {
["result">=>
string(5952) "widetest_XXXXXXXXX //changed for security reasons
}
["event">=>
array(1) {
["result">=>
string(1) "1"
}
}
lets set now $_SESSION["domain">="wideserv" . the account with the listing problem. result
array(7) {
["module">=>
string(5) "Mysql"
["func">=>
string(7) "listdbs"
["type">=>
string(5) "event"
["source">=>
string(8) "internal"
["apiversion">=>
string(1) "1"
["data">=>
array(1) {
[0]=>
array(0) {
}
}
["event">=>
array(1) {
["result">=>
string(1) "1"
}
}
The query not failing but not give me the result of this, and only this account. if i change $_SESSION["domain"> to an account name that not exist, lets say "mpampatsa" it will give me an error
array(2) {
["error">=>
string(45) "User parameter is invalid or was not supplied"
["data">=>
array(2) {
["result">=>
string(1) "0"
["reason">=>
string(45) "User parameter is invalid or was not supplied"
}
}
Thx for your time.
-
Hello :) Do you notice any output to /usr/local/cpanel/logs/error_log when this occurs? Thank you. 0
Please sign in to leave a comment.
Comments
1 comment