You should have:
PHP Code:
$sock->query('/CMD_API_DATABASES',
array(
'action' => 'create',
'name' => "db",
'user' => "dbuser",
'passwd' => "$pass",
'passwd2' => "$pass",));
Username should not be included into 'name' and/or 'user' of DB. It will be handled by Directadmin.
Sample for creating DB: http://files.directadmin.com/service...d_database.php
Other samples: http://files.directadmin.com/service...cket/examples/
By the way here
PHP Code:
$uname = "username";
$upass = "password";
you should have credentials of an user, neither a reseller's nor admin's, unless you use "Login-As" feature (www.directadmin.com/api.html)
p.s. If it does not solve the issue, please specify What error you have?
DirectAdmin Forums...
ما را در سایت DirectAdmin Forums دنبال می کنید
برچسب : نویسنده : ایمان اصلاحی directadmin بازدید : 324 تاريخ : سه شنبه 23 خرداد 1396 ساعت: 13:06