dos8410 2014-01-12 17:38
浏览 103
已采纳

pecl_http无法加载

This is my server configuration:

  • CentOS release 6.5 (Final)
  • PHP 5.5.7
  • pecl_http 2.0.4 stable
  • Server version: Apache/2.2.15 (Unix)

I have everything up and running except when I tried to load the pecl_http module it gives me the following warning and it won't load:

PHP Warning:  PHP Startup: Unable to load dynamic library '/path/to/php/modules/http.so' - /path/to/php/modules/http.so: undefined symbol: php_persistent_handle_abandon in Unknown on line 0

I tried to look everywhere but without a luck. The install seems fine but I don't know what's wrong with it.

  • 写回答

4条回答 默认 最新

  • douyi8408 2014-01-29 21:22
    关注

    I came here with the same problem - I couldn't get 2.0.4 to work - in hopes of helping you or others that stumble here, I invite you to check out my answer on serverfault here.

    For your convenience I've also copied it below:


    I didn't have a setup problem - at least not to my knowledge. I am running nginx + php5-fpm. My php.ini file was correctly configured and all my other extensions were working properly - test it with phpinfo() or php --ini.

    My problem with pecl_http (HttpRequest) was the extension's version (2.0.4). Check your version by running in the command line

    pecl list
    

    I was unable to get pecl_http-2.0.4 to work, but I was able to run

    pecl uninstall pecl_http

    then

    pecl install pecl_http-1.7.6. Make sure you have libcurl installed as well or you might experience install failures.

    After restarting php5-fpm and my webserver (nginx) everything was working prefectly!


    EXTRA HELP:

    Before you install - and pear is installed - you may want to run these two commands assuming you are using the php.ini in fpm - or you can write the path according to your configuration:

    pear config-set php_ini /etc/php5/fpm/php.ini
    pecl config-set php_ini /etc/php5/fpm/php.ini
    

    This makes it so that pecl knows which php.ini file you are using with your web-server and will add the extension=http.so in the correct spot. This helped me so maybe it'll help you too!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀