I've created a web application that utilizes an internet server and database located with a hosting company (on the floor) along with a server running on Amazon . com Web Services EC2. Both servers might be utilized by a person throughout a session and both will have to know some session details about a person. I'd rather not Publish the data that's required by both servers because I dont would like it to be visible to browsers / Firebug etc. And So I need my session data to persist across servers. And i believe that which means that the best choice would be to store all / a few of the data which i need within the database instead of inside a session. The simplest factor to complete appears to become to help keep the periods but to Publish the session_id between servers and employ this because the answer to research the information I want from the 'user_session_data' table within the database.
I've checked out Tony Marston's article "Saving PHP Session Data to a database" - must i make use of this or will a table using the session data which i need and session_id as key suffice? What will be the problem with creating my very own table and hang of techniques for storing the information I want within the database?
If transfer speed and response occasions between EC2 and also the database server are great enough, I see not a problem with storing the session data as referred to, and passing the session_id along when transfering the consumer to another server.
Storing session data inside a database is fairly common practice. "Storing data on the session" doesn't mean any actual storage method – creating files on disk is just PHP's default setting, because it does not require any setup.