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

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

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!