I create a new database using the script below.
<?
include("httpsocket.php");
$sock = new HTTPSocket;
$sock->connect('domein.nl',2222);
$sock->set_login('user','pass');
$sock->set_method('POST');
$sock->query('/CMD_API_DATABASES',
array(
'action' => 'create',
'name' => "database_naam",
'user' => "gebruikersnaam",
'passwd' => 'wachtwoord',
'passwd2' => 'wachtwoord'
));
$result = $sock->fetch_body();
echo $result."<br /><hr /><br />";
?>
This all woks fine, but I fail creating a new database with an excisting user. When I enter that username and password on the script it reports an error: "User already excists". How can I solve this?
<?
include("httpsocket.php");
$sock = new HTTPSocket;
$sock->connect('domein.nl',2222);
$sock->set_login('user','pass');
$sock->set_method('POST');
$sock->query('/CMD_API_DATABASES',
array(
'action' => 'create',
'name' => "database_naam",
'user' => "gebruikersnaam",
'passwd' => 'wachtwoord',
'passwd2' => 'wachtwoord'
));
$result = $sock->fetch_body();
echo $result."<br /><hr /><br />";
?>
This all woks fine, but I fail creating a new database with an excisting user. When I enter that username and password on the script it reports an error: "User already excists". How can I solve this?