1

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.

3
  • 2
    What about your cache settings? Make sure to set that to database as well. It is possible not to use Redis. Commented Jul 9, 2020 at 21:44
  • Welcome to stackoverflow. Instead of commenting out Providers, why don't you install the PHP Redis Extension? Its a fast cache driver. Commented Jul 9, 2020 at 22:27
  • Are you trying to use Laravel Horizon? It only runs on redis. Commented Jul 10, 2020 at 0:25

2 Answers 2

1

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
Sign up to request clarification or add additional context in comments.

1 Comment

installing the package: composer require predis/predis worked as well, so run: composer require predis/predis
0

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 Illuminate\Redis\RedisServiceProvider::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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.