Jacob, <br><br>The parts I changed only improved proper session expiry in jsapi mode, but didn't fix the other freakish 1% problem of sessions expiring for no reason.<br><br>I'm still investigating THAt problem. I'll report back if I discover anything. I'm glad to know it's not just us having the problem.
<br><br>Cheers,<br><br>Liz<br><br><div><span class="gmail_quote">On 4/29/06, <b class="gmail_sendername">Delfos, Jacob</b> <<a href="mailto:jacob.delfos@maunsell.com">jacob.delfos@maunsell.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;">
<p><font size="2">Liz,<br>
<br>
I think I have had similar problems, now that I think of it. I never looked into it, because the "session expired" on first load only happens sometimes, probably 1% of cases :) I thought it was just a freak unsolvable bug.
<br>
But only on our internal server through the intranet. To get to our external server, we have to go through a firewall and proxy server, slowing it down sufficiently to probably not make it happen.<br>
<br>
Thanks for the fix, I will try it out on Monday.<br>
<br>
regards,<br>
<br>
Jacob</font></p></div><font size="2"></font><div style="direction: ltr;"><span class="e" id="q_10ae8ba3c61ecfa1_1"><font size="2"><br>
<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:chameleon-bounces@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">chameleon-bounces@lists.maptools.org</a> on behalf of Liz Godwin<br>
Sent: Sat 4/29/2006 5:17 AM<br>
To: <a href="mailto:chameleon@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">chameleon@lists.maptools.org</a><br>
Subject: [Chameleon] Sessions and jsapi<br>
<br>
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,<br>
the session will timeout when you first call it. So obviously the 24<br>
minutes (or however long it is) hasn't passed to expire the session<br>
normally.<br>
<br>
The reason I bring up speed, is I'm wondering if it's happening because it's<br>
in JSAPI mode and making concurrent calls to the server. One of them is<br>
called before the session exists and fails. Is this possible??? So far<br>
I've been hard pressed to duplicate this on my development server, but it's<br>
happening on the production one. go figure! The production server is<br>
faster than the development one.<br>
<br>
When I wrote the code, I extended the JSAPI widget to include a JS function<br>
that redirects the client to a restart page containing a link to the<br>
application. This function is called in UpdateMap.php like this...<br>
<br>
if (!initializeSession("sid")){<br>
$szFormContents = "<input type=\"hidden\" name=\"SESSION_EXPIRED\"<br>
value=\"true\" />\n";<br>
$szOnLoad = 'NLWISSessionExpired()';<br>
echo BuildHTMLOutput( $szOnLoad, $szFormContents, 0 );<br>
return;<br>
}<br>
<br>
such that if any call is made back to the server the app will redirect when<br>
the session has expired. I added this because in jsapi mode, the<br>
sessionexpired widget doesn't work. I also added code in session.inc.php to<br></font></span></div><div style="direction: ltr;">
<font size="2">check for an expired session and if it has to do similar redirection. All</font></div><div style="direction: ltr;"><span class="q"><font size="2"><br>
of this works beautifuly on the dev server, at least if it's happened i<br></font></span></div><div style="direction: ltr;"><span class="q">
<font size="2">don't remember when and cannot duplicate it. On the production one (and<br>
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/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://nlwis-snite1.agr.gc.ca/eco/</a> or <a href="http://nlwis-snite1.agr.gc.ca/plant00/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://nlwis-snite1.agr.gc.ca/plant00/</a><br>
<br>
PLEASE - if it fails abnormally for you, please send me an e-mail with the<br>
time (with time zone) you used it, and the application you were on.<br>
<br>
Cheers,<br>
<br>
Liz<br>
<br>
</font></span></div><div style="direction: ltr;">
<p></p>
</div></blockquote></div><br>