Which session driver are you using in production?
You should probably show how and where you're writing/reading session data.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello everyone, I have a bug in my app on production server only, I am unable to reproduce it locally. The app is still under construction and I'm just testing the production server so the app is not really available to the public yet.
In my jewelry ecommerce app, I have a custom ring building multistep form where the user first selects a ring, then selects a diamond and finally adds this custom ring to the cart.
I am saving this selection in the session whether the user is logged in or logged out. I figured it would be easier to save it in the session than the database. The data has 2 big json objects: ring and diamond.
The issue begin on the production server when I select the ring, it gets added to the session and I see the request in the Network tab. but then as soon as I select the diamond on the next step of the form, the session data gets wiped out and the post request being made to /build/diamond returns error 400 Ring data not found in session so adding it to cart returns error 500 because the data is not present.
This behavior is also inconsistent, sometimes this error doesn't appear and I can select and add a custom ring to the cart normally. This is like 10% of the times but the rest of the 90% I get the error.
So I am really lost as to why this is happening. My only lead at the moment is Session Blocking. This is my only lead because my app is making 2 consecutive (but not concurrent) api requests to /build/ring to save the ring selection before making the request to /build/diamond so maybe this is being blocked by laravel.
But why wouldn't it block it on local server as well?
I appreciate your help on this and if there's a better way to achieve what I want without using Session data, I'm willing to listen.
PS: On my local machine I'm using PHP8.2.12 but on the production server I'm using PHP8.2.22.
Please or to participate in this conversation.