Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

elliotk's avatar

Redis - Undefined index: driver

Hello,

I am trying to get up and running with Redis for the first time. I'm using Forge, and currently, all my caching is to file. I thought it was as simple as changing the CACHE_DRIVER but perhaps I am wrong?

I ssh in to my server to check for Redis

forge@prod-web:~$ redis-cli ping
PONG

Seems Redis is running.

So i update my CACHE_DRIVER=redis

It then blows up

ErrorException (E_NOTICE)
Undefined index: driver

I have checked my cache.php seems to be ok

'redis' => [

            'client' => 'predis',

            'default' => [
                'host' => env('REDIS_HOST', 'localhost'),
                'password' => env('REDIS_PASSWORD', null),
                'port' => env('REDIS_PORT', 6379),
                'database' => 0,
            ],

        ],

And I have installed predis too via composer require predis/predis

Have I missed something obvious?

0 likes
1 reply

Please or to participate in this conversation.