skip to Main Content

I am using Laravel vessel to run my Laravel projects. I recently tried running a Laravel project with the new version 6, and I have encountered this error

LogicException

Please remove or rename the Redis facade alias in your "app" configuration file in order to avoid collision with the PHP Redis extension.

I took a bit to find out how to fix this issue, so I am leaving this question and an answer so other people who find this issue can hopefully fix it without so much struggle.

2

Answers


  1. Chosen as BEST ANSWER

    The problem running the new Laravel version 6 on the docker vessel is that laravel has changed its default driver from predis to phpredis, this change is creating the error mentioned in the question.

    To fix this issue you have to set the driver again to user predis instead of phpredis.

    you can change your config/database.php to set predis as default

    'client' => env('REDIS_CLIENT', 'predis'),
    

    or change it in your .env file

    REDIS_CLIENT=predis
    

    As mention by other users. You could also install phpredis if that is an option that works for your project.


  2. In my case I noticed php_redis extension was missing on system.

    With installation of php_redis this error went away.

    If you are thinking of going back to predis, I won’t suggest that as predis is abandoned and Laravel is going to remove support for it in future

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search