[UPDATED with code]
I have a strange session problem that only seems to occur the first time someone accesses the page.
If you go to the following page and click Next Step you may find that you get sent to a page not found page. If you then go back to the link and press Next Step again this time it will work.
The weird thing is that if you clear your cookies and all other browser related history the issue doesn't seem to occur again. Nor does it if you try from a different browser.
I have had a look at the Resources tab on Chrome and can see that the session isn't saved initially but is on the second attempt.
This is the relevant parts of the code. So at the beginning of the script:
// set the http headers
header("Content-Type: text/html;charset=utf-8");
header("X-XSS-Protection: 1; mode=block");
header("Strict-Transport-Security: max-age=31536000; includeSubDomains");
header("X-Content-Type-Options: nosniff");
header("X-Permitted-Cross-Domain-Policies: master-only");
session_set_cookie_params ( $lifetime = 0, $path = "/", $domain= "pulse.gd", $secure = TRUE, $httponly = true );
// set-up the session handler
session_set_save_handler("sess_open", "sess_close", "sess_read", "sess_write", "sess_destroy", "sess_gc");
register_shutdown_function("sess_shutdown");
then at the top of function that is being called:
session_start();
then when it has built the array to be passed to the next step
// store the step array in the session object
$_SESSION['stepArray'] = serialize($stepArray);
At which point it (should) display the next page. This is handled by Smarty.
Does anyone have any suggestions?
Thanks