sev_pro's avatar

sev_pro liked a comment+100 XP

5mos ago

If you use the cookie session driver, all session data is stored in cookies. What you're seeing is the encrypted session data. Nothing weird there.

But why would you need to store session data in cookies rather than on the server? For example, the file session driver requires no configuration and makes this problem go away. And for a more scalable solution you could look at database or Redis sessions.

https://laravel.com/docs/12.x/session#configuration

sev_pro's avatar

sev_pro liked a comment+100 XP

5mos ago

there are also significant size limitations with using cookie session storage

sev_pro's avatar

sev_pro wrote a reply+100 XP

5mos ago

Hmm... thanks. We'll move to the database session driver. As I understand that should work on either environment.

sev_pro's avatar

sev_pro wrote a reply+100 XP

5mos ago

I have two applications and I want to share the session on my local environment. Running on localhost:8000 and localhost:8001.

Using the cookie session driver works. But using file does not work.