dongsutao8921 2016-07-15 13:20
浏览 77
已采纳

将cURL添加到OAuth请求引擎支持时出现问题

I've recently been setting up a new environment for a web application I'm working on and I've run into this following issue that I cannot figure out.

Currently I have a docker-composer setup based off of https://hub.docker.com/r/ruslangetmansky/docker-apache-php/

Where I have my API, APP and DB running and need them to talk between each other.

During the initialisation of this, I'm currently doing the following command:

command: bash -c 'apt-get update && apt-get -y install curl libcurl3 libcurl3-dev php5-curl php5-oauth && rm -rf /var/lib/apt/lists/* && composer install && /sbin/entrypoint.sh'

I've even tried separating out the php5-oauth in-case we're running into a timing issue like so, but the same issue persists:

command: bash -c 'apt-get update && apt-get -y install curl libcurl3 libcurl3-dev php5-curl && apt-get -y install php5-oauth && rm -rf /var/lib/apt/lists/* && composer install && /sbin/entrypoint.sh'

As you can see, I've been trying everything to get php5-oauth built with cURL support, however at the moment the current build ends up with only php_streams request engine support: oauth with no cURL support However it looks like cURL support is also built in: curl support also exists So currently when I boot my app+api, I can't talk between them due to no cURL support, as I've errors all over my application complaining of undefined constants such as the two following:

Message: Use of undefined constant OAUTH_REQENGINE_CURL - assumed 'OAUTH_REQENGINE_CURL'

and

Message: OAuth::setRequestEngine() expects parameter 1 to be long, string given

due to the lack of cURL support.

I also spotted similar questions around Stack Overflow, but nothing seems to mention what to do when these are installed and enabled but only 1 request engine is available.

Other research has led me to http://www.davidogilo.co.uk/technical/how-to-fix-oauth_reqengine_curl-is-undefined/ but my cURL default path has always been found succesfully.

Can anyone give me a hand here, or at least point out where i'm possibly going wrong? Cheers.

  • 写回答

1条回答 默认 最新

  • dongqigu0429 2016-07-15 14:53
    关注

    Reinstall oauth with sudo pecl install oauth to compile it with cURL support

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 怎么看梯度直方图以,怎么判断梯度消失/爆炸,怎么解决
  • ¥15 aspnetdll文件访问拒绝
  • ¥15 wpf中在模版中寻找元素
  • ¥15 MFC平台生成指定圆
  • ¥15 jmeter出现403
  • ¥500 求华为P30PRO手机硬盘数据恢复
  • ¥15 关于#vscode#的问题:ESP32开发板对接MQTT实现小灯泡的开关
  • ¥15 TMC2209串口模式下读取不到寄存器的值串口助手蓝色字体是发过去的消息,绿色字体是收到的消息,第二行发送读取寄存器的指令但是没有读取到寄存器的值串口助手如下图:接线如下图,如何解决?
  • ¥15 怎样删除 右键菜单里的 剪切(T)和复制(C)
  • ¥15 高通安卓11提取完整线刷包软件,或者优博讯dt50顺丰刷机包