dsc56927 2017-05-01 16:00
浏览 96
已采纳

Odoo + Ripcord PHP XMLRPC库:“无法访问https://demo.odoo.com/start”

I'm trying to make a connection from my PHP script to an Odoo server, but running into inconsistent connection problems.

I have 3 test locations:

  1. Localhost
  2. Domain A
  3. Domain B

And 2 test scripts:

Odoo Demo:

require_once("ripcord.php");
$info = ripcord::client('https://demo.odoo.com/start')->start();
print_r($info);

Odoo Target Server:

require_once("ripcord.php");
$common = ripcord::client("###.###.###.##:8069/xmlrpc/2/common");
print_r($common->version());

This gives me strange and inconsistent outcomes:

  • Localhost + Odoo Demo: success
  • Localhost + Odoo Target Server: success
  • Domain A + Odoo Demo: success
  • Domain A + Odoo Target Server: Could not access ###.###.###.##:8069
  • Domain B + Odoo Demo: Could not access https://demo.odoo.com/start
  • Domain B + Odoo Target Server: Could not access ###.###.###.##:8069

Versions:

Localhost:

  • PHP version: 7.0.15
  • Ripcord version: 0.9

Server (Domain A & Domain B):

  • PHP version: 5.6.30
  • Ripcord version: 0.9

What makes it stranger is that Domain A and Domain B are on the same server. What factors could determine whether or not the request succeeds? More importantly, how can I successfully access the Odoo Target Server from Domain A and B?

  • 写回答

1条回答 默认 最新

  • douhao3562 2017-05-08 13:47
    关注

    Turns out my problem was two-fold:

    1. Domain B seemed to have a poblem with the default RipcurlTransport (Stream); perhaps a problem with file system permissions. Switching to Curl solved the problem of not being able to connect to the Odoo demo database.
    2. The server is behind a Firewall, which needed to allow outgoing connections to port 8069. This solved the problem of not being able to connect to the production database.
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。