PHP and Redis, take 0

Just realized I used Composer last time I needed this, which nicer in the sence that it manages this dependency in a more consistent way.

I used Predis which worked just fine and has excellent documentation (and was produced, and maintained, by the Norwegian Broadcasting Corporation).

PHP and Redis

I’m on an old Ubuntu version, and just needed something to dump a Redis value as JSON.
sudo -s
git clone https://github.com/nicolasff/phpredis
cd phpredis
aptitude install php5-dev -y
phpize
./configure && make && make test && make install
echo "extension=redis.so" > /etc/php5/conf.d/20-redis.ini
service apache2 restart

And then
<?php
#
# Serves the JSON clob from Redis
#
header('Content-Type: application/json');
$redis = new Redis();
$redis->connect('127.0.0.1', 6379);
$data = $redis->get('movie_database');
echo $data;
?>