Em Andamento

Fix Cpanel API Code

Hi,

I’m facing strange problem. I hope you can solve it.

The following code is to create database for cpanel remotely using Cpanel API:

<?php

include("[url removed, login to view]");

$db_host = "[url removed, login to view]";

$cpaneluser = "cpanelusername";

$cpanelpass= "cpanelpassword";

$xmlapi = new xmlapi($db_host);

$xmlapi->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. Can you fix it?

Habilidades: PHP, Hospedagem Web

Ver mais: you fix, cpanel mysql database, secure api, create cpanel, api connection, cpanel api php, server configuration problem, cpanel php configuration, mysql connection error, mysql database connection error, swt browser api, browser api vb6, ssl problem solve, php cpanel api, create ssl connection, rest api cpanel, api code, mysql ssl connection, cpanel php api, fix strange database output, fix cpanel mysql, secure php api, cpanel ssl, problem 136 code, database output code

Acerca do Empregador:
( 2 comentários ) Mecca, Saudi Arabia

ID do Projeto: #6823481

Premiar a:

veroslav

Hired by the Employer

$12 USD / hora
(2 Avaliações)
0.7