Reputation: 397
I installed Redis extension from here. My console see redis installed, when I run php -i
I see
redis
Redis Support => enabled
Redis Version => 2.2.7
When I try to create instance of Redis class I get Fatal error: Uncaught Error: Class 'Redis' not found
.
phpinfo()
shows thay my php.ini
file is in /usr/local/php5/lib/php.ini
.
I found solution here buy it doesn't work. I also copied extension path from php-cli ini
.
All extension paths which I tried to use are:
Could anyone help me?
Upvotes: 4
Views: 14442
Reputation: 1684
so strange when you saw Redis but still failed. Just this line is enough:
extension = /usr/local/opt/php55-redis/redis.so
Then check php -v
, make sure no error related to redis happen.
Or try installing by brew install php55-redis
(I did successfully).
-- note that in OSX El Capitan you have to update brew (xcode-select --install
)
-- (for Apache) Make sure the php5_module is loaded correctlly:
open /etc/apache2/httpd.conf
search for php5_module
, replace the current path to /usr/local/Cellar/php55/5.5.xx/libexec/apache2/libphp5.so
(5.5.xx is the version when you type php -v
)
If still failed anyway, restart MAC :((
-- If you install by brew
but error, give me some comments.
Upvotes: 5