[Chameleon] Sessions and jsapi
godwin.liz at gmail.com
Fri Apr 28 17:17:31 EDT 2006
Hello fellow users,
I have a question about something I havn't seen anyone post about yet...
I have a really fast chameleon application (IMHO). Sometimes when it runs,
the session will timeout when you first call it. So obviously the 24
minutes (or however long it is) hasn't passed to expire the session
The reason I bring up speed, is I'm wondering if it's happening because it's
in JSAPI mode and making concurrent calls to the server. One of them is
called before the session exists and fails. Is this possible??? So far
I've been hard pressed to duplicate this on my development server, but it's
happening on the production one. go figure! The production server is
faster than the development one.
When I wrote the code, I extended the JSAPI widget to include a JS function
that redirects the client to a restart page containing a link to the
application. This function is called in UpdateMap.php like this...
$szFormContents = "<input type=\"hidden\" name=\"SESSION_EXPIRED\"
$szOnLoad = 'NLWISSessionExpired()';
echo BuildHTMLOutput( $szOnLoad, $szFormContents, 0 );
such that if any call is made back to the server the app will redirect when
the session has expired. I added this because in jsapi mode, the
sessionexpired widget doesn't work. I also added code in session.inc.php to
check for an expired session and if it has to do similar redirection. All
of this works beautifuly on the dev server, at least if it's happened i
don't remember when and cannot duplicate it. On the production one (and
test server too), it fails 1% (ish) of the time.
To see the application live, check out the following:
http://nlwis-snite1.agr.gc.ca/eco/ or http://nlwis-snite1.agr.gc.ca/plant00/
PLEASE - if it fails abnormally for you, please send me an e-mail with the
time (with time zone) you used it, and the application you were on.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chameleon