cPanel API with Secure Connection
Hi Everyone,
I"m facing strange problem. I hope one of Cpanel experts can solve it.
The following code is to create database for cpanel remotely using Cpanel API (without Root credentials):
This work fine IF I set Server Configuration "Tweak Settings " Security "Tweak Settings" Require SSL => OFF However, I want it through secure connection. So I modified the code to use port 2083 instead ($xmlapi->set_port( '2083' ); // PORT SETTING). But, it does not work (connection time out). Same problem happened even If I modified the server configuration to require SSL: Server Configuration "Tweak Settings " Security "Tweak Settings" Require SSL => ON Any help, idea. Plz share you experience!
set_port( '2082' ); // PORT SETTING
$xmlapi->password_auth("".$cpaneluser."","".$cpanelpass."");
$xmlapi->set_debug(1);//output actions in the error log 1 for true and 0 false
$xmlapi->set_output('array');//set this for browser output
//create database
$databasename="dbname";
$createdb = $xmlapi->api1_query($cpaneluser, "Mysql", "adddb", array($databasename));
echo "Good Job";
?>This work fine IF I set Server Configuration "Tweak Settings " Security "Tweak Settings" Require SSL => OFF However, I want it through secure connection. So I modified the code to use port 2083 instead ($xmlapi->set_port( '2083' ); // PORT SETTING). But, it does not work (connection time out). Same problem happened even If I modified the server configuration to require SSL: Server Configuration "Tweak Settings " Security "Tweak Settings" Require SSL => ON Any help, idea. Plz share you experience!
-
Hi, I hired a company to solve this, they told me that the cpanel domain itself should be SSL certified. (I create that domain for testing, so it is not a qualified domain) My WHM/cPanel server has SSL installed. And the connection is to server not to that cpanel domain. I do not think, this is the reason, what do you think? 0 -
Hello :) Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you. 0 -
Hello, Thanks for your reply, The problem is resolved.It was coming form the hosting provider that I'm running the script from. 0 -
I am happy to see you were able to address the issue. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
4 comments