Home > Article > Backend Development > How to install redis extension in php
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.
Installation method:
(Recommended tutorial: php video tutorial)
1. According to PHP version number, compiler version number and CPU architecture download the compressed package
2. After decompression, copy php_redis.dll and php_redis.pdb to the ext directory of 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!