04-14-2023, 10:08 PM
Hello
I want to make use of the EHCP API, however im having some trouble with it.
Im trying to use one of the default api examples, namely api2.php:
Heres the code it has:
<code>
require("../classapp.php");
$domainname = "d2omainsite.com";
$panelusername = "blabla";
$ftppassword=$paneluserpass="123";
$ftpusername = "ftpusername2";
$status="active";
$app = new Application();
$app->connectTodb(); # fill config.php with db user/pass for things to work..
$app->activeuser=$panelusername;
$ret=$app->addDomainDirect($domainname,$panelusername,$paneluserpass,$ftpusername,$ftppassword,$status,$email='',$quota=0);
if($ret){
echo "Success";
} else {
echo $app->output;
}
echo "($ret)";
</code>
My problem is that the above code returns and error that the user "blabla" is not active:
<code>
Error:User is not active..: blabla (Your account not active,contact your panel service provider, status: )
If you just upgraded your ehcp, try to logout, login back.
</code>
It is true that the user is not active, but am i completely missing something, when my thought was the script was supposed to create the user? Or do i use it wrong?
Oh and config.php is holding the correct db information..
Restored from old drupal forum, for user uid:27840 username:djda9l
You may reset your password to access your new account here.
I want to make use of the EHCP API, however im having some trouble with it.
Im trying to use one of the default api examples, namely api2.php:
Heres the code it has:
<code>
require("../classapp.php");
$domainname = "d2omainsite.com";
$panelusername = "blabla";
$ftppassword=$paneluserpass="123";
$ftpusername = "ftpusername2";
$status="active";
$app = new Application();
$app->connectTodb(); # fill config.php with db user/pass for things to work..
$app->activeuser=$panelusername;
$ret=$app->addDomainDirect($domainname,$panelusername,$paneluserpass,$ftpusername,$ftppassword,$status,$email='',$quota=0);
if($ret){
echo "Success";
} else {
echo $app->output;
}
echo "($ret)";
</code>
My problem is that the above code returns and error that the user "blabla" is not active:
<code>
Error:User is not active..: blabla (Your account not active,contact your panel service provider, status: )
If you just upgraded your ehcp, try to logout, login back.
</code>
It is true that the user is not active, but am i completely missing something, when my thought was the script was supposed to create the user? Or do i use it wrong?
Oh and config.php is holding the correct db information..
Restored from old drupal forum, for user uid:27840 username:djda9l
You may reset your password to access your new account here.