Replies: 3 comments
-
From the sounds of it you may have installed Redis but not the php redis extension. https://laravel.com/docs/8.x/cache#redis You can install the extension to PHP using |
Beta Was this translation helpful? Give feedback.
-
Thanks @riotCode for your response. I think I had install php redis extension. When I check my pecl list, redis is existed. |
Beta Was this translation helpful? Give feedback.
-
@ericyam94 It looks a lot like there is a difference in which configuration files are loaded between running a webserver Apache in this case and when you run php from the command line.. I would take a note on the loaded configuration file(s) section when running phpinfo() on the webserver and when running |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
I am new to laravel and right now I am trying to install phpredis to have my laravel supported.
I've checked that my phpredis is installed successfully and has setup in laravel in config/database.php.
client' => 'phpredis',
When I do "php -i | grep Redis", I can see my php Redis is installed.
Redis Support => enabled
Redis Version => 5.3.4
Redis Sentinel Version => 0.1
I also rename the Facade in app.php to
'ZRedis' => Illuminate\Support\Facades\Redis::class,
However, when I do
ZRedis::connection()->ping();
It tell me "Class 'Redis' not found in file PhpRedisConnector.php"
I found out that with my
php -i | grep redis
redis
redis.arrays.algorithm => no value => no value
redis.arrays.auth => no value => no value
redis.arrays.autorehash => 0 => 0
redis.arrays.connecttimeout => 0 => 0
...
However in Apache phpinfo(), I couldn't find redis. Is there something I did wrong??
I checked, the php version and the php.ini file location are the same both apache phpinfo() and php -i.
Configuration File (php.ini) Path | /usr/local/etc/php/7.4
Loaded Configuration File | /usr/local/etc/php/7.4/php.ini
Beta Was this translation helpful? Give feedback.
All reactions