[Chameleon] Sessions and jsapi

Liz Godwin godwin.liz at gmail.com
Mon May 1 09:07:07 EDT 2006


Jacob,

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.

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.

Cheers,

Liz

On 4/29/06, Delfos, Jacob <jacob.delfos at maunsell.com> wrote:
>
> Liz,
>
> 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.
> 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.
>
> Thanks for the fix, I will try it out on Monday.
>
> regards,
>
> Jacob
>
>
>
>
>
> -----Original Message-----
> From: chameleon-bounces at lists.maptools.org on behalf of Liz Godwin
> Sent: Sat 4/29/2006 5:17 AM
> To: chameleon at lists.maptools.org
> Subject: [Chameleon] Sessions and jsapi
>
> 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
> normally.
>
> 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...
>
> if (!initializeSession("sid")){
>     $szFormContents = "<input type=\"hidden\" name=\"SESSION_EXPIRED\"
> value=\"true\" />\n";
>     $szOnLoad = 'NLWISSessionExpired()';
>     echo BuildHTMLOutput( $szOnLoad, $szFormContents, 0 );
>     return;
> }
>
> 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.phpto
> 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.
>
> Cheers,
>
> Liz
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20060501/95b0d2c7/attachment.html


More information about the Chameleon mailing list