I'm trying to run this code:
<?php
try {
$oRedis = new Redis();
$oRedis->connect('127.0.0.1', 6379, 1);
if(!empty($_GET['ig'])) {
$oRedis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_IGBINARY);
}
elseif(!empty($_GET['php'])) {
$oRedis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);
}
if(!$oRedis->ping()) {
throw new Exception('Connection lost');
}
$sKey = !empty($_GET['key']) ? $_GET['key'] : 'very_long_namespace:very_long_name';
$oRedis->incr($sKey);
$iValue = $oRedis->get($sKey);
echo "{$sKey} => {$iValue}";
}
catch(Exception $oException) {
echo $oException->getMessage();
}
Sample url: http://example.com/test.redis.php?ig=1&key=ig0001
And I have got Segmentation fault (11).
Some details: PHP 5.4.15 (built: May 15 2013 10:08:21).
Linux: CentOS release 6.4 (2.6.32-358.6.1.el6.x86).
Compiled with --enable-redis-igbinary
I'm trying to run this code:
Sample url: http://example.com/test.redis.php?ig=1&key=ig0001
And I have got Segmentation fault (11).
Some details: PHP 5.4.15 (built: May 15 2013 10:08:21).
Linux: CentOS release 6.4 (2.6.32-358.6.1.el6.x86).
Compiled with --enable-redis-igbinary