This code is useful for PHP applications that use load-balanced front-end environments like Azure Web Apps.
Storing session information in a MySQL database makes it easy to continuously deploy your code and to swap staging and production employments without terminating user sessions.