I have my form POST the login data to the "POST /user/login" route, this route handles login functionality.
The route ends in rerouting to "GET /user/login". First thing it does is check if the user is already logged in, and if so reroute to "GET /user/overview".
In the "GET /user/login" my SESSION is fine and the system will go on with the reroute. But when it runs the "GET /user/overview" route in succession the PHPSESSID changes and I get a 500 (since my expected session data is not available).
I have no idea what's happening. I neither use
session_regenerate_id()
nor
session_id('randomid here')
Something caught my attention. The last route returns these headers: (yes four times)
Set-Cookie:PHPSESSID=ks0u5j2o4pvmbmonut7u9v58b5; path=/; domain=stool.local; HttpOnly
Set-Cookie:PHPSESSID=ks0u5j2o4pvmbmonut7u9v58b5; path=/; domain=stool.local; HttpOnly
Set-Cookie:PHPSESSID=ks0u5j2o4pvmbmonut7u9v58b5; path=/; domain=stool.local; HttpOnly
Set-Cookie:PHPSESSID=ks0u5j2o4pvmbmonut7u9v58b5; path=/; domain=stool.local; HttpOnly