Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

v-add-database command not working

General questions about VestaCP
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
sakarya
Posts: 18
Joined: Fri May 30, 2014 8:21 pm

v-add-database command not working
  • Quote

Post by sakarya » Tue Dec 10, 2019 12:47 pm

Hello.

I'm tring to integrate vesta panel my cms. But I can't create db for each user.

Code: Select all

$dbvars = array(
	'user' => $vst_username,
	'password' => $vst_password,
	'returncode' => 'yes',
	'cmd' => 'v-add-database',
	'arg1' => $vesta_username,
	'arg2' => $site_database,
	'arg3' => $site_db_user,
	'arg4' => $site_db_pass
);
$dbdata = http_build_query($dbvars);
$db_curl = curl_init();
curl_setopt($db_curl, CURLOPT_URL, 'https://' . $vst_hostname . ':8083/api/');
curl_setopt($db_curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($db_curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($db_curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($db_curl, CURLOPT_POST, true);
curl_setopt($db_curl, CURLOPT_POSTFIELDS, $dbdata);
$db_answer = curl_exec($db_curl);

if($db_answer == 0) {
echo "ok";
} else {
echo "false";
}
I always getting false error message. what the reason can be?
Top

sakarya
Posts: 18
Joined: Fri May 30, 2014 8:21 pm

Re: v-add-database command not working
  • Quote

Post by sakarya » Wed Dec 11, 2019 12:14 pm

any idea?
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password