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

Tachi's avatar
Level 1

How to configure session driver?

I'm trying to use redis as my main session drive.

I changed this line in config/session.php:

'driver' => env('SESSION_DRIVER', 'redis')

But it's still writing everything to cookies.

How can I debug this session driver, to configure it to use redis properly?

Because now it automatically changes session driver to default one, without any warnings or anything.

Is there a good tutorial how to configure session to use redis?

Laravel 5.4.12

0 likes
3 replies
bashy's avatar

You shouldn't need to change the config file, only the .env.

Cookies will always be on the client regardless of the driver used...

1 like
Tachi's avatar
Level 1

@bashy But is there a way to debug redis connection, because now, nomatter what is in my config, I don't get any exceptions/wornings/errors and have no idea how to debug

bashy's avatar

You previously said nothing about debugging redis connections :)

Please or to participate in this conversation.