Starting some time yesterday afternoon, my PHP app hosted on GCP using App Engine sometimes (but not always) loses session data on submit. I’m using the following at the top of each page to handle POST data:
//if data passed via post, put it in session and reload page
if (isset($_POST['form_data'])) {
$_SESSION['form_data'] = $dp->clean_input_data($_POST['form_data']);
$_SESSION['action'] = 'submit';
header("location: ".$_SERVER['REQUEST_URI']);
die();
}
So every submit is effectively a redirect back to the same page. I have the same problem if I put data in $_SESSION and redirect to a different page. This has worked flawlessly for literally years…until yesterday. I have verified that the session exists and the session id is not changing. Sometimes it works fine but requires several tries. It is the same on a page that simply refreshes after changing a menu item vs one that accepts form data. I feel like something must have changed on the server side but am at a loss as to what it could be. AND I can’t seem to upgrade my GCP support to reach someone there.
Any ideas?