0
votes

I am trying to install phpredis library for using redis in my php scripts. I folloed the instructions here https://github.com/nicolasff/phpredis , ran the script for apache usage too. I added a redis.ini to /etc/php5/cli/conf.d in which I write extension=redis.so. I checked that redis.so is present in /usr/lib/php5/20090626 where other libraries like mysql.so are also present. Mysql works well in php, but when I try to use php redis,

$redis = new Redis();

This call doesn't return, anything after this statement is never executed.

PS: I am fairly new to php, ubuntu, redis etc.

Edit: I had to just restart apache server. Question can be closed.

1
Check your phpinfo() to see if Redis module is loaded. If not please refer this stackoverflow.com/questions/3279047/phpredis-on-fedora-12guy_fawkes

1 Answers

0
votes

Two things that you can check here :

  • First is your phpinfo to find out if redis extension is installed or not
  • Check if there is no authentication enabled in redis.conf file.

In case authentication is enabled connect it by passing credentials.