Square1;10998109 wrote:So just to confirm, session_start(); is NOT at the very top of the page in this case. I had thought that was imperative.
It has never been a requirement that the call to session_start() be anywhere near the "top" or even one of the first statements in a PHP script. The only real requirement is that it comes before HTTP headers are sent (which can happen if you output anything, for example).
Sessions are never "lost" until they are deleted by the garbage collector due to inactivity. The only thing that is really "lost" is the cookie used to propagate the session ID from one page request to another.
Thus, if the PHP directive session.cookie_secure is off, then the cookie is to be sent for both HTTP and HTTPS requests.