This is my server configuration:
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.
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With