WIN10 64-bit installation memcache expansion and open Redis extensions

Source: Internet
Author: User

There is an introduction to the WIN10 under the WAMP environment, in this not to repeat, PHP operations memcache have memcache Library and memcached Library, where Memcache is a PHP built-in extension library, support object-oriented and process-oriented operations, Memcached is a set of third-party extensions based on libmemcached that supports object-oriented operations only and is more powerful, richer and more efficient than memcache extensions. Below is a description of how to install the memcache extension and enable the Redis extension in the window environment.


Download file
附件有memcached的安装文件和php5.2到php5.6的memcache扩展文件,php_redis.dll:http://windows.php.net/downloads/pecl/releases/redis/2.2.7/
Install extensions
install service or service already installed),输入D:回车,接着cd到memcached解压的那个文件夹下执行memcached -d install命令安装,回车,如果没有任何提示则表示安装成功,再输入memcached -d start回车,开启memcached进程,,可以在服务中看到memcached正在运行

Turn on extensions
将附件中php_memcache扩展解压到php安装目录下的ext文件夹中,选择好适应的版本,之前安装的php版本是php-5.5.37-Win32-VC11-x64,从phpinfo函数可以看出php版本信息,如,所以我选择了php5.5-ts-vc11-x64版本的php_memcache扩展,在php.ini中extension添加一条extension=php_memcache.dll,同理将下载的phpredis扩展解压到php安装目录下的ext文件夹中,在php.ini中extension添加一条extension=php_redis.dll


Restart Apache Server
打开测试文件写入phpinfo()函数,则表示扩展安装成功。


Continue editing the test file and enter the following code

<?phpPhpinfo (); $memcache =New Memcache (); $memcache->connect (' 127.0.0.1 ',11211)Ordie ( "Could not connect Memcached server!"); $memcache->set (  "Hello memcache!<br/>"); echo $memcache->get ( ' memcache '); echo  "<br>"; $redis = new Redis (); $redis->connect ( "192.168.1.103",  "6379"); //php client set IP and port //store a value $redis->set (" say " ,  "Hello Redis"); echo $redis->get ( "say"); //hello redis ?>        

Output Hello memcache! configuration succeeded!
Attachment:
Http://files.cnblogs.com/files/weblm/memcached%E6%89%A9%E5%B1%95.rar

Reprint: Http://www.cnblogs.com/weblm/p/5793030.html#_labelTop

WIN10 64-bit installation memcache expansion and open Redis extensions

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.