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 linux驱动,linux应用,多线程
  • ¥20 我要一个分身加定位两个功能的安卓app
  • ¥15 基于FOC驱动器,如何实现卡丁车下坡无阻力的遛坡的效果
  • ¥15 IAR程序莫名变量多重定义
  • ¥15 (标签-UDP|关键词-client)
  • ¥15 关于库卡officelite无法与虚拟机通讯的问题
  • ¥15 目标检测项目无法读取视频
  • ¥15 GEO datasets中基因芯片数据仅仅提供了normalized signal如何进行差异分析
  • ¥100 求采集电商背景音乐的方法
  • ¥15 数学建模竞赛求指导帮助