nicolasff/phpredis — Issue #62: hGetAll raise Unexpected PHP error "igbinary_unserialize_header" 
Author: larest
Created: 2011-10-18 09:05:47+00:00
State: open

$redis = new Redis();
$redis->connect( 'localhost',6379);
$redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_IGBINARY);

$redis->hSet('hash1','data', 'it just test' );
$redis->hSet('hash1','session_id','cm617u0tlimjskliafm4b80ng1 ');

$data=$redis->hGetAll('hash1');
print_r($data);

// show:
// Unexpected PHP error [igbinary_unserialize_header: version mismatch: 1936028531 vs 2] severity [2] in [..filename..]
// Array ( [data] => Array ( [0] => it just test ) [session_id] => cm617u0tlimjskliafm4b80ng1 )

$data=$redis->hGet('hash1','data');
print_r($data);
// show data without error
$data=$redis->hGet('hash1','session_id');
print_r($data);
// show data without error