[Chameleon] Passing Session Parameters

Paul Spencer pspencer at dmsolutions.ca
Wed Oct 20 08:28:26 EDT 2004


Hi Mike,

thanks for the indepth analysis.  I won't be changing how this works for 
version 1.99/2.0 but I would be willing to entertain changes for the 
next version that would make this a lot easier.

I'm going to stay in information gathering mode here and let everyone 
who has an interest in this comment on how they think it should work. 
Once I have a good idea what the requirements are, I'll work on a solution.

I would suggest that you create a bug in bugzilla and we can encourage 
everyone to contribute there.

Cheers,

Paul

PS if you do create a bug, please post your original email to it so we 
have a history of the discussion.

Mike Leahy wrote:
> Hello list,
> 
> I have just now been able to get a chameleon application to use the same user-
> based sessions as the rest of the website I'm developing.  This revealed a new 
> problem, however. I've found that if I open a chameleon application with a 
> session that already exists (using the same session structure that Chameleon 
> uses) the CWCInitialize() function in chameleon.php does not get called.  This 
> is because chameleon only does this if there is no SID set in the 
> moHttpFormVars object, the variable mbSessionOK is false(because the session 
> is actually valid now), or if the $_SESSION['gszMapName'] is previously set 
> and different from $szMapFile.  I've worked around this by setting $_SESSION
> ["gszMapName"] equal to an empty string just after a user's session is 
> created, before sending the browser to the chameleon application - this then 
> satisfies the last condition so that CWCInitialize will be executed.
> 
> A second (and less important) problem: in session.php, I was having a anissue 
> with the parameters for the initializeSession function; the third parameter 
> (the session ID) is not actually used if an sid appears in the _GET or _POST 
> globals.  This is not a bit problem in itself, but it prevents the use of a 
> different session-id than the one initially supplied in the URL (e.g., at the 
> time a user logs in with the site I'm working on, the SID gets changed).  I 
> got around this by setting the 'sid' variable to the desired name in both _GET 
> and _POST globals before running initializeSession.
> 
> Maybe I'm doing all this in a very roundabout way, but once I figured it out, 
> the workarounds were fairly simple and I'm now able to move ahead with the 
> development of my own chameleon applications.  If anyone has ideas for a 
> simpler or better way to get around these little problems, I'd be interested 
> in any suggestions.
> 
> Thanks,
> Mike
> 
> 
> ----------------------------------------
> This mail sent through www.mywaterloo.ca
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 


More information about the Chameleon mailing list