A
Anonymous
Guest
hi all, please if this is not appropriate place to post this question, kindly move it to and inform to have track.
I want to use Odoo (previsouly OpenERP) webservices using PHP as the examples on Odoo documentation (Odoo External API), link is here: https://www.odoo.com/documentation/14.0/webservices/odoo.html
I have tried python examples on above page which works fine... even from another machine's same vm (both vm's are Ubuntu 18.04 Desktop, running Odoo 14) I have not any idea of using/writing code in PHP, on my Windows host machine, I have downloaded XAMPP portable, enable xmlrpc in php.ini, installed ripcord library through composer, (as "ripcord" used in PHP examples in above official guide) started XAMPP controller + Apache, created a .php file in d:\xampp\htdocs\mytest\test.php with code below:
run the page in Chrome, it says Warning: require_once(ripcord.php): failed to open stream: No such file or directory in D:\xampp\htdocs\mytest\test.php Fatal error: require_once(): Failed opening required 'ripcord.php' (include_path='\xampp\php\PEAR') in D:\xampp\htdocs\mytest\tests.php
Is there anything else i missed or have to configs/settings or should i have xmlrpc.php too? if yes, where it should be copied? please help as I am stuck. if any related info required, please ask for to have enough information to resolve the problem.
regards
I want to use Odoo (previsouly OpenERP) webservices using PHP as the examples on Odoo documentation (Odoo External API), link is here: https://www.odoo.com/documentation/14.0/webservices/odoo.html
I have tried python examples on above page which works fine... even from another machine's same vm (both vm's are Ubuntu 18.04 Desktop, running Odoo 14) I have not any idea of using/writing code in PHP, on my Windows host machine, I have downloaded XAMPP portable, enable xmlrpc in php.ini, installed ripcord library through composer, (as "ripcord" used in PHP examples in above official guide) started XAMPP controller + Apache, created a .php file in d:\xampp\htdocs\mytest\test.php with code below:
Code:
<?php
//url = my ubuntu vm ipv4 with odoo default port
$url = "http://192.168.18.71:8069";
$db = 'odb';
$username = 'odoouser@myhost.com';
$password = 'admin';
require_once('ripcord.php');
$common = Ripcord::client($url'/xmlrpc/2/common');
$ver = $common->version();
echo $ver;
$uid = $common->authenticate($db, $username, $password, array());
echo $uid;
?>
Is there anything else i missed or have to configs/settings or should i have xmlrpc.php too? if yes, where it should be copied? please help as I am stuck. if any related info required, please ask for to have enough information to resolve the problem.
regards