What if you run phpinfo() via web?
Please make sure the PHP Redis extension is installed and enabled.
I'm getting spammed with Please make sure the PHP Redis extension is installed and enabled. in my logs, despite having the redis.so extension installed on MacOS. I installed the Redis extension by running pecl install redis, which succeeds with the following message:
Installing '/usr/local/Cellar/php/7.3.12/pecl/20180731/redis.so'
install ok: channel://pecl.php.net/redis-5.1.1
Extension redis enabled in php.ini
By running phpinfo() in tinker, I can see that my loaded php.ini is
Configuration File (php.ini) Path => /usr/local/etc/php/7.3
Loaded Configuration File => /usr/local/etc/php/7.3/php.ini
If I open up /usr/local/etc/php/7.3/php.ini, extension="redis.so" is listed at the top of the file.
What makes this more and more strange is that if I dig deeper into where the original Please make sure the PHP Redis extension is installed and enabled. error is coming from, it looks to be in laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php:76, which looks like this:
throw new LogicException(extension_loaded('redis') ? 'Please remove or rename the Redis facade alias in your "app" configuration file in order to avoid collision with the PHP Redis extension.' : 'Please make sure the PHP Redis extension is installed and enabled.');
So according to this, the extension isn't loaded. But if I load up tinker again and run extension_loaded('redis') then I get a true result.
I can't for the life of me figure out what's going on here. Why does PhpRedisConnector not see that the extension is loaded?
For completeness, I've also removed the Redis alias from my app.php file as instructed to by the Laravel docs.
Please or to participate in this conversation.
