Home >Backend Development >PHP7 >One trick to teach you how to solve the problem of not being able to load redis in php7

One trick to teach you how to solve the problem of not being able to load redis in php7

藏色散人
藏色散人forward
2021-11-04 15:59:591828browse

This article is provided by the PHP7 tutorial column to introduce to you how to solve the problem of not being able to load redis in php7. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

One trick to teach you how to solve the problem of not being able to load redis in php7

Specific problem description:

php7 cannot load the redis extension

Execute /etc/init.d/ php7-fpm restart prompts as follows

Starting php-fpm [07-Dec-2015 17:46:03] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library '/server/php7/lib/php/extensions/no-debug-non-zts-20151012/redis.so' - /server/php7/lib/php/extensions/no-debug-non-zts-20151012/redis.so: undefined symbol: zval_used_for_init in Unknown on line 0
redis版本 redis-cli 2.6.17
redis php 扩展版本 2.2.7 (http://pecl.php.net/package/redis 下载的最新的)

Solution:

so easy!

https://github.com/edtechd/phpredis

Download this, recompile, and the problem is solved!

The above is the detailed content of One trick to teach you how to solve the problem of not being able to load redis in php7. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete