Connection: Keep-Alive and PHP sessions not working

Posted by user366667 on Stack Overflow See other posts from Stack Overflow or by user366667
Published on 2010-06-14T20:47:35Z Indexed on 2010/06/14 20:52 UTC
Read the original article Hit count: 162

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about php

Related posts about session