phpredis extension doesn't work, unable to load 'redis.so'

血红的双手。 提交于 2019-12-22 04:18:08

问题


I installed nginx, php, php-fpm, php-pecl-redis by yum.

All of them work but the last one.

When I run /usr/sbin/php-fpm, I got this:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/redis.so' - /usr/lib/php/modules/redis.so: undefined symbol: igbinary_unserialize in Unknown on line 0

I don't know what "igbnary_unserialize" means and how to fix it.

I checked the redis.so file under right path. I add extension=redis.so to "php.ini"

php version: 5.3.3

phpredis version: 2.2.7


回答1:


I had the same issue. I'm on Ubuntu 16.04 LTS. Running sudo apt-get install php-igbinary resolved the issue for me. I have other issues, but that's what solved this one.




回答2:


Probably an issue with igbinary, is this installed? (try for example: cat /etc/php.d/igbinary.ini).

Here you can find and install igbinary




回答3:


Related to this bug https://bugs.launchpad.net/ubuntu/+source/php-redis/+bug/1762935

You should remove php-redis from packages: apt purge php-redis , and install it via pecl install redis

You should add "extension=redis.so" to php.ini

and remove redis from config.d in your php directory:

rm /etc/php/7.2/fpm/conf.d/@20-redis.ini

and

rm /etc/php/7.2/cli/conf.d/@20-redis.ini

restart php fpm and you will see that problem solved




回答4:


just resolve the same problem:

php-pecl-redis installed by yum will cause this problem. so you need to install the php-redis manually. wget the package and phpize - configure - make ....



来源:https://stackoverflow.com/questions/33994039/phpredis-extension-doesnt-work-unable-to-load-redis-so

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!