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.
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services