Solution to initialization failure when installing redis extension in PHP_PHP Tutorial

WBOY
Release: 2016-07-13 17:08:43
Original
1099 people have browsed it

This article will introduce to you the solutions to the failure to initialize the redis extension when installing PHP. I hope these methods will be helpful to all my friends.

The error message is as follows:
PHP Warning: PHP Startup: redis: Unable to initialize module
Module compiled with module API=20050922
PHP compiled with module API=20090626
These options need to match in Unknown on line 0
First let’s talk about the reason why this error occurs:
This is caused by the inconsistency between the version of phpize executed when compiling the source code package and the version of phpize in the current PHP environment
Solution:
1. Delete the compiled source code package phpredis-master and redis.so in the corresponding directory and re-decompress phpredis-master
2. Check whether there are php php-config php-cgi phpize files in the /usr/sbin directory. If they exist, delete these files and re-establish the corresponding soft connections to this directory
ln -s php /usr/local/php/bin/php
ln -s php-cgi /usr/local/php/bin/php-cgi
ln -s php-config /usr/local/php/bin/php-config
ln -s phpize /usr/local/php/bin/phpize
Please refer to the current installation directory of php for the above directory
3. Re-enter the phpredis-master directory to install

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/629817.htmlTechArticleThis article will introduce to you the solutions to the failure to initialize the redis extension in PHP installation. I hope some methods will be helpful to all my friends. helped. The error message is as follows: PHP Warning: PHP Startup: r...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template