I have been working on a webApp which should be able to perform tasks only by using AJAX. It seems to work pretty good, but I am running into a problem, because I do not store Session
variables on the public site.
My login procedure is similar to iCloud's. You arrive to one page asking for a login. Your login is sent to a server using AJAX and returns a true
or false
. If true, the login box disappears and you are ready to work with the applications.
When you Are looking at the image above, you shall see the two green boxes as the exact same site, without any URL refreshes or anything. It is simply the same page.
The Pink boxes represents Apache Servers that hasn't registered any Sessions
. My Session Class has been builded using the session_set_save_handler
idea.
session_set_save_handler(
array($this, 'open'),
array($this, 'close'),
array($this, 'read'),
array($this, 'write'),
array($this, 'destroy'),
array($this, 'gc')
);
I can't seem to figure out a way for the public site to ask for data on the pink
servers without a Session ID. Could anybody tell me the idea behind the session_set_save_handler
idea as if I was 6 years old? I have read the PHP manual for details, but it really confuses me.
If anybody knows about how this communication method could work properly, please tell me. All of the Apache Servers are connected through a LAN network, and are able to communicate. Also they all have access to the same Session Class
in an Apache include Library.