Hi,
there is some Bug with SSL and DA Api?
am asking since I try to create DB via API and it's work without SSL
but not working with SSL
mean:
work perfect, but when DirectAdmin panel working via SSL
not working at all and I got blank page.
any suggestions?
there is some Bug with SSL and DA Api?
am asking since I try to create DB via API and it's work without SSL
but not working with SSL
mean:
Code:
<?php
$user = "mydauser";
$pass = "mydapass";
$server = "shared03.starltd.net";
$server_port=2222;
$server_ssl="N";
$dbname = "db1";
$dbuser = "usr1";
$dbpass = "passwd1";
include 'httpsocket.php';
$sock = new HTTPSocket;
$sock->connect($server,2222);
$sock->set_login($user,$pass);
$sock->set_method('POST');
$sock->query('/CMD_API_DATABASES',
array(
'action' => 'create',
'name' => 'db',
'user' => 'dbuser',
'passwd' => '$pass',
'passwd2' => '$pass'
));
$result = $sock->fetch_body();
echo $result;
Code:
<?php
$user = "mydauser";
$pass = "mydapass";
$server = "shared03.starltd.net";
$server_port=2222;
$server_ssl="Y";
$dbname = "db1";
$dbuser = "usr1";
$dbpass = "passwd1";
include 'httpsocket.php';
$sock = new HTTPSocket;
// $sock->connect($server,2222);
$sock->connect("ssl://".$server,2222);
$sock->set_login($user,$pass);
$sock->set_method('POST');
$sock->query('/CMD_API_DATABASES',
array(
'action' => 'create',
'name' => 'db',
'user' => 'dbuser',
'passwd' => '$pass',
'passwd2' => '$pass'
));
$result = $sock->fetch_body();
echo $result;
any suggestions?