Vincent Creusy
Vincent Creusy

Reputation: 11

Laravel session will not flash values in production

We deployed a project in production, using redis for session driver. The problem is that the old values, the success and error messages are not displayed everytime (they appear sometimes but very rarely).

In development, everything works fine, old values are presents, same for success and error messages.

We tried to change session driver, session domain ...

In 'config/session.php'

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

'domain' => env('SESSION_DOMAIN', null),

In '.env'

SESSION_DRIVER=redis
SESSION_DOMAIN=<our_website_url>

Any idea to fix this ?

Thank you in advance for your anwser !

[EDIT]
We noticed that the flash works on the login page but not after login successed. So the old data and the error message work both on the login fail.

Upvotes: 1

Views: 322

Answers (1)

Vincent Creusy
Vincent Creusy

Reputation: 11

We just solved this issue.

It was not a laravel issue, but a server bad configuration.

Upvotes: 0

Related Questions