nicolasff/phpredis — Issue #107: Exception: Redis server went away
Author: hunginday
Created: 2011-12-20 02:10:06+00:00
State: open

Sorry, I don't know this bug is phpredis's bug or not, so I still post here.

I execute this PHP code in command line mode it's ok:

/usr/bin/php push.php

=====================
push.php code:
=====================
$redis = new Redis();
$redis->connect("127.0.0.1");
//$redis->pconnect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout.

$channels = array("channel1");
$data = "Pushed event!";

$message = array(
'channels' => $channels,
'data' => $data
);
$redis->publish('juggernaut', json_encode($message));

But when requesting it by a GET action in HTTP it throws exception: "Redis server went away".
http://localhost/realtimeserver/push.php

Please help!!