Php installation of redis extension initialization failure Solution

Source: Internet
Author: User
Tags config php

This article introduces how to solve the initialization failure of redis extension installation in php. I hope some methods will help you.

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 cause of this error:
The version used to compile the source code package and run phpize is inconsistent with the phpize version in the current php environment.
Solution:
1. Delete the compiled source code package phpredis-master and redis. so in the corresponding directory and decompress phpredis-master again.
2. Check whether the php-config php-cgi phpize file exists in the/usr/sbin directory. If the phpize file exists, delete the file and re-establish the corresponding soft connection 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
The preceding directory is subject to the current php installation directory.
3. re-enter the phpredis-master Directory for installation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.