Phpredis remote connection not to Redis?

Source: Internet
Author: User
Problem Description:

   1、在win8上vmware了一个centos,并且在windows下ping通了centos的ip:192.168.1.101;      2、在windows下安装phpredis,并且在phpinfo中看到了phpredis支持的版本,证明安装成功;      3、在centos下能连上127.0.0.1:6379,正常操作redis存储;   

Not connected under Windows, prompt: Connection timed out. The code is as follows:

           
  
   connect('192.168.1.101', 6379);      echo "Connection to server sucessfully";      echo "Server is running: " . $redis->ping();    ?>   

Reply content:

Problem Description:

   1、在win8上vmware了一个centos,并且在windows下ping通了centos的ip:192.168.1.101;      2、在windows下安装phpredis,并且在phpinfo中看到了phpredis支持的版本,证明安装成功;      3、在centos下能连上127.0.0.1:6379,正常操作redis存储;   

Not connected under Windows, prompt: Connection timed out. The code is as follows:

           
  
   connect('192.168.1.101', 6379);      echo "Connection to server sucessfully";      echo "Server is running: " . $redis->ping();    ?>   

vim /etc/redis.conf

Revision changed to

bind 0.0.0.0

Restart Service View Port

service redis restartnetstat -ntpl |grep redis

Should be able to see the monitor 0.0.0.0

  • 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.