Table of Contents
Most applications require some form of session management. Since we deploy our applications on redundant, load balanced servers, session management must be implemented in a machine independent manner. Our PHP environment uses an Oracle table to manage all sessions. This support is seamless to the developer and requires no extra effort to use.
In order to provide extra services involving the session, the built in session_start() function should not be used to start a session. Instead, you should use the custom function mu_start_session(). The mu_start_session() function requires one parameter, the name of your session (used as the cookie name to identify your session). Starting sessions is most easily done near the beginning of the Application.php file using the command:
Session data is accessed in the $_SESSION superglobal array. Any data you place into the array is serialized and stored at the end of the request. At the start of a request, the call to mu_start_session() will cause any session data to be unserialized and placed back in the $_SESSION array for your use.
The mu_start_session() functions takes some additional parameters that allow you to control how the session cookie is set on the client's browser.