Home  >  Article  >  Backend Development  >  How to install redis extension in php

How to install redis extension in php

王林
王林Original
2020-09-28 15:36:095432browse

How to install the redis extension in php: 1. Download the compressed package that matches the version; 2. Unzip the compressed package and copy the file to the ext directory; 3. Edit the php.ini configuration file and add [extension=php_redis .dll]; 4. Restart apache.

How to install redis extension in php

Installation method:

(Recommended tutorial: php video tutorial)

1. According to PHP version number, compiler version number and CPU architecture download the compressed package

How to install redis extension in php

2. After decompression, copy php_redis.dll and php_redis.pdb to the ext directory of php

How to install redis extension in php

3. Modify php.ini, (PS: This php.ini file is in the Apache directory) add:

; php_redis
extension=php_igbinary.dll
extension=php_redis.dll

Note: extension=php_igbinary.dll must be placed in front of extension=php_redis.dll, otherwise this extension will not take effect.

4. After restarting Apache, use phpinfo to check whether the extension is successfully installed.

Related recommendations: php training

The above is the detailed content of How to install redis extension in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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