Hello fellow users,<br><br>I have a question about something I havn't seen anyone post about yet...<br><br>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 normally.
<br><br>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.
<br><br>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...<br>
<br><span style="font-family: courier new,monospace;">if (!initializeSession("sid")){</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> $szFormContents = "<input type=\"hidden\" name=\"SESSION_EXPIRED\" value=\"true\" />\n";
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> $szOnLoad = 'NLWISSessionExpired()';</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
echo BuildHTMLOutput( $szOnLoad, $szFormContents, 0 );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> return;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">}</span><br><br>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.
<br><br>To see the application live, check out the following:<br><a href="http://nlwis-snite1.agr.gc.ca/eco/">http://nlwis-snite1.agr.gc.ca/eco/</a> or <a href="http://nlwis-snite1.agr.gc.ca/plant00/">http://nlwis-snite1.agr.gc.ca/plant00/
</a><br><br><span style="font-style: italic; color: rgb(255, 0, 0);"><span style="font-weight: bold;">PLEASE </span>- if it <span style="font-weight: bold;">fails abnormally</span> for you, please send me an e-mail with the time (with time zone) you used it, and the application you were on.
</span><br><br>Cheers,<br><br>Liz<br><br>