This question has been flagged
1 Reply
1957 Views

can anyone help me with this ?

MY CODE

$user = "my_email";
$password = "my_password";
$dbname = "mydbname";
$serverurl= "http://my.server.url:8069";
$connexion = new xmlrpc_client($server_url."/xmlrpc/common");
$connexion->setSSLVerifyPeer(0);
$c_msg = new xmlrpcmsg('login');
$c_msg->addParam(new xmlrpcval($dbname,"string"));
$c_msg->addParam(new xmlrpcval($user,"string")); 
$c_msg->addParam(new xmlrpcval($password,"string")); 
$c_response = $connexion->send($c_msg);
if($c_response->errno !=0){
    die('error: '.$c_response->faultString());
}else{
echo "connexion successful";
//continue my work
}

END CODE



this script return this error

error : une tentative de connexion a échoué car le parti connecté n’a pas répondu convenablement au delé d'une certaine durée ou une connexion établie a échoué car l'hote de connexion n'a pas répondu

Avatar
Discard
Best Answer

The XMLRPC Library that you are using didn't get a response and the request has timed out that means you can't access Odoo in the host machine maybe because access rights problems or Odoo is not running.

Anyways i will provide you with all the php files that you need to make a connection with your database check it here.



Happy to help :) an upvote will be awesome

Avatar
Discard