1

I just installed phpredis on my mac and when I do

$ php -m

I see

PHP Modules]
bcmath
....
redis
Reflection
.....
zlib

[Zend Modules]
Zend OPcache

But in my phpinfo I do not see that information.

I have cd /usr/local/etc/php/5.5/conf.d/ext-redis.ini with

[redis]
extension="/usr/local/opt/php55-redis/redis.so"

php -i shows the following

redis

Redis Support => enabled
Redis Version => 2.2.6

Reflection

Reflection => enabled
Version => $Id: 95b780d3f0d017feba96a5c35cca9541186114ad $

session

Session Support => enabled
Registered save handlers => files user redis

What am I missing here

thanks

Asim Zaidi
  • 27,016
  • 49
  • 132
  • 221

1 Answers1

1

ok I found out what was going on.

I had to copy the default ini file in /etc to /etc/php.ini

and then I add this in the /etc/php.ini

extension="/usr/local/opt/php55-redis/redis.so"

and restarted the webserver and I was able to see redis now.

All good!

Asim Zaidi
  • 27,016
  • 49
  • 132
  • 221
  • 1
    Did this same thing but redis still doesn't show up in phpinfo() and when I create an instance of the Redis class, I get the error 'Class Redis could not be found in /path/to/file.php' what am in missing. I have restarted, stopped and start the server (apache) several times. – Pila Jun 05 '17 at 07:11