Debug directadmin for api

staff

Verified User
Joined
Sep 19, 2007
Messages
114
Location
France
Hello I have a problem with my code to create a ticket and my john says to use this

Code:
cd /usr/local/directadmin
killall -9 directadmin
./directadmin

I do not understand when I'm supposed to start to see what should I do?
I write lots of scrolling slowly.

Thank you
 
Hello,

It's actually
Code:
cd /usr/local/directadmin
killall -9 directadmin
./directadmin b2000
You'll get a lot of code output to the screen. If you're trying to debug a POST or GET call (for API debugging), you'll be looking for these lines:

for GET requests, you'll be looking for:
Code:
GET string:
and for POST string data:
Code:
Post string:
and the important bits related to those lines will follow right after them. Note that if you didn't pass any data for the item, they won't show up.

For example, if you call /CMD_ALL_USER_SHOW, there is no GET.. but if you call /CMD_SHOW_USER?user=testuser there is a GET, and user=testuser would be what the 'GET string' will show.

The same idea is used for the "Post string", but if you're making a POST call, almost always, you'll get data (assming the data is being passed correctly.. since that's the reason to make a POST.. to pass data)

John
 
In addition, since both string types use the word "string", you can use grep to filter out the important parts.
Code:
./directadmin  b2000 | grep string
then test your requests to DA. Once finished, use ctrl-c to stop DA, then "./directadmin d" to start it in the normal mode.

John
 
thank you very much john ;)

I'll see if I come because I am French and it's hard to understand English
 
Back
Top