skip to Main Content

I’am using Laravel queue.and I set up my .env file as follows.

QUEUE_DRIVER = database
QUEUE_CONNECTION = database

But I get this error.

Please make sure the PHP Redis extension is installed and enabled.

Can anyone explain that and fix this problem and give me the solution.
Do I really need redis? Because I do not want to use it.

2

Answers


  1. Chosen as BEST ANSWER

    Thank you for all. I solve this issue by adding this line in .env file

    REDIS_CLIENT = predis
    

    then run this command:

    php artisan config:cache
    

  2. It gives that error because the registered service provider uses config/database.php’s redis config array to initialize redis (make connection).

    If you remove/comment-out IlluminateRedisRedisServiceProvider::class, from the providers array of config/app.php it won’t initialize redis and won’t give an error.

    Edit: please be sure that none of the drivers of session, queue, cache etc didn’t use redis after making that change.

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