Richathon
Richathon

Reputation: 101

Laradock - PHP Redis extension is installed and enabled

i'm trying to enable Horizon on Laradock but i always received this message "Please make sure the PHP Redis extension is installed and enabled" I've accessed to Workspace container to check whether the php-redis extension is installed or not. But you can see the image the php-redis is already newest version docker-compose exec workspace bash

I've open the .env of Laravel project and changed as below

REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379

I've also open the .env file in Laradock folder and enable to all INSTALL_PHPREDIS=true. After that, docker-compose build --no-cache workspace php-fpm php-worker

This is .env file of Laradock folder

But it's still error with php-redis extension

I found some answers that install predis . but i dont want to use it. I would like to use phpredis and keep 'client' => env('REDIS_CLIENT', 'phpredis') in config/database.php

Is there anybody faced this issued, please help me. Thank you so much

Upvotes: 2

Views: 5778

Answers (1)

Richathon
Richathon

Reputation: 101

I found the issued. Thanks to calebanthony from GitHub .

It looks like it's installing php8.0-redis instead of the version for 7.3 like I need. I manually edited my workspace/Dockerfile file manually on the PHPRedis section to install php7.3-redis instead of install php-redis. A hack, but got me live again.

I've been using php 7.3 so far. I hope this small thing can help someone. Thanks

Upvotes: 3

Related Questions