Installing Redis and Phpredis extensions in a Windows environment

Source: Internet
Author: User
Tags phpinfo
Installing Redis and Phpredis extensions in a Windows environment

1. First Configure PHP:

Need to find PHP extension folder in Windows Integration Environment, ext, and then find your own PHP. dll file on the Web

For example, my phpinfo inside show is Arti. : x86, so need to choose X86, this is not related to the system, my system is still 64 bit!

Then my integration environment is TS instead of NTS this can be found in the Phpinfo file!

Download File Php_igbinary.dll,php_redis.dll

Then modify the configuration file PHP.ini (in the PHP folder and in Apache)

Extension=php_igbinary.dll

Extension=php_redis.dll

2. In the installation of Windows Redis,redis very much like the green version of the software, directly copy the folder to a folder, and then open two DOS windows, a boot service, a client execution command

3. Finally, you can find this redis extension in Phpinfo and write a testredis.php in the WWW directory.

<?php
$redis = new Redis ();
$redis->connect (' 127.0.0.1 ', 6379);
$redis->set (' Test ', ' Hello Redis ');
echo $redis->get (' Test ');
?>

The output is correct and the operation succeeds

Installing Redis and Phpredis extensions in a Windows environment

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.