How to install the redis extension in php5.5: first download redis; then copy php_redis.dll and php_redis.pdb to the ext directory of php; then modify php.ini; and finally restart Apache.
The operating environment of this article: Windows 7 system, PHP version 5.5, DELL G3 computer
Use the phpinfo() function to view the version information of PHP. This will determine the extension file version
Based on the PHP version number, compiler version number and CPU architecture,
Select php_redis-2.2.5-5.5-ts -vc11-x86.zip and php_igbinary-1.2.1-5.5-ts-vc11-x86.zip
Download address:
http://windows.php.net/downloads/pecl /snaps/redis/2.2.5/
http://windows.php.net/downloads/pecl/releases/igbinary/1.2.1/
After decompression, copy php_redis.dll and php_redis.pdb to the ext directory of php
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
After restarting Apache, use phpinfo to check whether the extension is successfully installed
Create a new test.php page
<?php $redis=new Redis(); $redis->connect('192.168.1.11',6379); $redis->auth('123456'); $redis->set('test','helloworld'); echo $redis->get('test'); ?>
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to install redis extension in php5.5. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool
