Problem Description: {code...} cannot be connected in windows. the prompt is: connection timeout. The code is as follows: {code ...}
Problem description:
1. vmware installed a centos on win8 and pinged the centos ip address 192.168.1.101 on windows. 2. install phpredis on windows, in addition, you can see the version supported by phpredis in phpinfo, which proves that the installation is successful. 3. you can connect 127.0.0.1: 6379 to centos to operate redis storage normally;
If the connection fails in windows, the system prompts: the connection times 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. vmware installed a centos on win8 and pinged the centos ip address 192.168.1.101 on windows. 2. install phpredis on windows, in addition, you can see the version supported by phpredis in phpinfo, which proves that the installation is successful. 3. you can connect 127.0.0.1: 6379 to centos to operate redis storage normally;
If the connection fails in windows, the system prompts: the connection times 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
Change
bind 0.0.0.0
Restart the service to view the port
service redis restartnetstat -ntpl |grep redis
We can see the 0.0.0.0 listener.