Installing Redis extensions and memcached extensions for PHP5.6 under WINDOWS32

Source: Internet
Author: User
Tags phpinfo

I. PHP installation Redis extensions  1. Use the Phpinfo () function to view PHP version information, which will determine the extension file version

2. According to the PHP version number, the compiler version number and CPU architecture,

Choose Php_redis-2.2.5-5.6-ts-vc11-x86.zip and Php_igbinary-1.2.1-5.5-ts-vc11-x86.zip

http://windows.php.net/downloads/pecl/snaps/redis/2.2.5/

Http://windows.php.net/downloads/pecl/releases/igbinary/1.2.1/

3. After decompression, copy the Php_redis.dll and Php_igbinary.dll to the PHP ext directory

4. Modify the php.ini to include in the document:

; 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

5. After restarting Apache, use Phpinfo to see if the extension was installed successfully

Create a new test.php page

<?php
$redis = new Redis ();
$redis->connect (' 127.0.0.1 ', 6379);
$redis->set (' Test ', ' Hello Redis ');
echo $redis->get (' Test ');
?> Hello Redis 6. To use Redis in Windows, you need to download the Redis software for Windows: Https://github.com/dmajkic/redis/downloads download Php_ Redis-2.2.5-5.6-ts-vc11-x86 when running the demo, remember to open the Redis service: CD command switch directory to C:\redis run Redis-server.exe redis.conftwo. PHP installation memcache extensionInstall memcached1 in Windows 7 64bit environment, download and extract to D:\memcached (: Memcached-win64) 2, install to Windows service, open cmd command line, go to memcached directory, Execute: Memcached-d install command, installation service if the failed to install service or service already installed error occurs without installation,  The Cmd.exe needs to be run as an administrator. 3. Start the service, execute: memcached-d start 4. Install the PHP memcache extension to download the correct version of the Php_memcache.dll dynamic link library file and place it in the Php5.6.16\ext directory.    5. Edit PHP.ini, add the following line of code to the php.ini file. Extension=php_memcache.dll6. See if the memcache extension was successfully installed in Phpinfo.

Installing Redis extensions and memcached extensions for PHP5.6 under WINDOWS32

Related Article

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.