Skip to Content
Menu
This question has been flagged
1 Reply
3721 Views

I followed the odoo Web Services API example to try to connect odoo from PHP, however the php could not access the url https://pstest-inntrade-6.odoo.com/start
Then, I tried to change the code to access the demo server url ( https://demo.odoo.com/start ), it could be successfully accessed. Hence, I believe the php was correctly coded.

I was using the same code with ripcord, which I only change the URL, hence, I believe some server side setting should be enabled to access https://pstest-inntrade-6.odoo.com/start

Below is my code:

<?php
include('odoo_db.php');
require_once('../ripcord-master/ripcord.php');
$info = ripcord::client('https://demo.odoo.com/start')->start();
// $info = ripcord::client('https://pstest-inntrade-6.odoo.com/start')->start();

list($url, $db, $username, $password) =
array($info['host'], $info['database'], $info['user'], $info['password']);

echo "HOST ", $info['host'], "<br>DB ", $info['database'], "<br>USER ", $info['user'], "<br>PW ", $info['password'];
?>

Below is the output with demo server :
HOST https://demo3.odoo.com
DB demo_110_1514533248
USER admin
PW admin

When I change the code to connect to https://pstest-inntrade-6.odoo.com/start
it encountered error as below (URL not found)

Fatal error: Uncaught exception 'Ripcord_TransportException' with message 'Could not access https://pstest-inntrade-6.odoo.com/start' in /home/content/36/13632736/html/Barnes/ripcord-master/ripcord_client.php:488 Stack trace: #0 /home/content/36/13632736/html/Barnes/ripcord-master/ripcord_client.php(228): Ripcord_Transport_Stream->post('https://pstest-...', '<?xml version="...') #1 /home/content/36/13632736/html/Barnes/odoo/odoo_connect.php(6): Ripcord_Client->__call('start', Array) #2 /home/content/36/13632736/html/Barnes/odoo/odoo_connect.php(6): Ripcord_Client->start() #3 {main} thrown in /home/content/36/13632736/html/Barnes/ripcord-master/ripcord_client.php on line 488


Can anyone help me with this? Thanks a lot!

Avatar
Discard
Best Answer

Hi Gary

I've got the same situation here. Do you know where the problem comes from ?

thanks for your help

Avatar
Discard