php - redis throws an error even though extension is loaded just fine -


its fifth day trying fix on mac mountain-lion. used home brew install phpredis using http://www.astonishdesign.com/blog/native-lamp-stack-mac-os-x. way home brew used install redis. php info shows

redis redis support   enabled redis version   2.2.3 

when run code

$redis = new redis(); $redis->connect('127.0.0.1', 6379);  $redis->set('key', 'val');  echo $redis->get('key') 

;

i error

 fatal error: uncaught exception 'redisexception' message 'redis server went away' in /library/webserver/documents/test/index.php on line 6     ( ! ) redisexception: redis server went away in /library/webserver/documents/test/index.php on line 6 

what missing

are sure redis server running?

if go mac command line , type redis-cli, prompt like:

redis 127.0.0.1:6379> 

if not, server isn't running. can start manually running redis-server, test script.

there better ways of running redis server on mac, @ least you'll know if it's matter of starting server.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -