dongzhong1929 2016-10-07 13:46
浏览 476

如何在nginx中启用curl

I'm using Ubuntu 14.04 LTS, PHP 5.5.9 and Nginx.

I already installed the newest php5-curl version and add "extension=php_curl.dll" into "/etc/php5/fpm/php.ini" I also restart service php5-fpm and nginx.

But when I run the code (run at localhost on windows 10, it is still working) I received the following message:

Fatal error: Call to undefined function curl_init() in /usr/share/nginx ...

Help fix it! Thank you!

  • 写回答

1条回答 默认 最新

  • dpmp9359 2016-10-07 13:55
    关注

    Check whether you really enabled the module for php-fpm and not PHP CLI by opening page with just phpinfo:

    <?php
    phpinfo();
    

    Then look for enabled modules or for ./configure command arguments which might include curl when building the source code of PHP.

    评论

报告相同问题?

悬赏问题

  • ¥15 github符合条件20分钟秒到账,github空投 提供github账号可兑换💰感兴趣的可以找我交流一下
  • ¥50 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?