phpredisのインストール
brew install php53-redis
==> Downloading https://github.com/nicolasff/phpredis/archive/2.2.4.tar.gz
######################################################################## 100.0%
==> PHP_AUTOCONF="/usr/local/opt/autoconf/bin/autoconf" PHP_AUTOHEADER="/usr/local/opt/autoconf/bin/autoheader" /usr/local/Cellar/php53/5.3.28/bin/phpize
==> ./configure --prefix=/usr/local/Cellar/php53-redis/2.2.4 --with-php-config=/usr/local/Cellar/php53/5.3.28/bin/php-config
==> make
==> Caveats
To finish installing redis for PHP 5.3:
* /usr/local/etc/php/5.3/conf.d/ext-redis.ini was created,
do not forget to remove it upon extension removal.
* Validate installation via one of the following methods:
*
* Using PHP from a webserver:
* - Restart your webserver.
* - Write a PHP page that calls "phpinfo();"
* - Load it in a browser and look for the info on the redis module.
* - If you see it, you have been successful!
*
* Using PHP from the command line:
* - Run "php -i" (command-line "phpinfo()")
* - Look for the info on the redis module.
* - If you see it, you have been successful!
==> Summary
インタラクティブシェルを起動
php -a
確認
$redis = new Redis();
$redis->connect('127.0.0.1');
$redis->set('hello', 'world');
var_dump($redis->get('hello'));
string(5) "world"
インタラクティブシェルを終了
quit