Connection: Keep-Alive and PHP sessions not working
- by user366667
We have a VB application that needs to run an specific flow on a PHP page.
This application was correctly catching the PHPSESSID cookie and using it for all subsequent requests.
However, PHP wasn't able to restore any changes made on $_SESSION variable.
The variable was changed, saved, and on the next request it was restored as an empty array.
We found out that changing the Connection header from "Keep-Alive" to "Close" fixed the issue.
I couldn't find anything on the web saying that PHP sessions shouldn't be restored under Keep-Alive connections.
Does anyone know why this was happening?
PS: We didn't find anything weird or different on Apache, ModSecurity or PHP configuration settings.