Sessions might be reset when a same page transfers from http to https protocol.
If the preceding http request sent no cookie to the server because the cookies were set to secure, the server finds no session id in the request and create new session id.
php_value session.cookie_httponly 1
php_value session.cookie_secure 1
That’s why the session was reset right before redirecting to https.