[Chameleon] Dynamic query result sid error
David Dabney
David.Dabney at noaa.gov
Thu May 5 11:59:35 EDT 2005
Paul,
Thanks for the fast response. I tried the changes you recommended but
they didn't seem to work. Then I vaguely remembered doing something in
the php.ini a while back. The session.use_trans_sid was set to 1. I
changed it back to 0 and things started working again. I still don't
quite understand this. You're solution made more sense.....Defining a
variable and assigning the session_id to it and passing it around.
Can you tell me why it works the other way? i.e. without the snippets
you sent me. So where does document.forms[0].sid.value come from?
Please excuse my php ignorance!
Sincerely,
Dave
; trans sid support is disabled by default.
; Use of trans sid may risk your users security.
; Use this option with caution.
; - User may send URL contains active session ID
; to other person via. email/irc/etc.
; - URL that contains active session ID may be stored
; in publically accessible computer.
; - User may access your site with the same session ID
; always using URL stored in browser's history or bookmarks.
session.use_trans_sid = 0
Paul Spencer wrote:
> David,
>
> couple of things to check:
>
> if you view the source of your main application page, is there an
> <input type="hidden" name="sid" value="..."> in it? or perhaps the
> name is SID?
>
> Have you added another form perhaps? If the input is in
> document.forms[1] this would also explain something.
>
> I can't recall exactly how the custom query stuff works. You can
> probably fix this problem by adding
>
> <input type="hidden" name="sid" value="[$sid|$]">
>
> to your template and
>
> $oApp->setVar( 'sid', session_id() );
>
> to your .phtml file before the CWCExecute call
>
> Cheers
>
> Paul
>
> David Dabney wrote:
>
>> I hope this ends up being a simple fix. I've been using Chameleon on
>> and off for the past few months. I started to use a customized query
>> results page which was working a month or so ago. I recently got
>> back to working on this project and now the results dialogue only
>> returns "Your session is invalid or has expired." The only thing
>> I've changed in the mean time that could affect this as far as I know
>> is upgraded to PHP 4.3.11 from 4.3.8 and went up to mapserver 4.4.2
>> from 4.2. A Windows XP upgrade or two also. This is the resulting
>> url when it trys to run my custom query window:
>> http://10.49.48.18/chameleon/ohh/htdocs/ddquery.phtml?x=207&y=74&sid=undefined
>>
>>
>> Obviously, it looks like a problem with sid.
>> Any ideas would be much appreciated.
>>
>> Regards,
>>
>> Dave
>>
>>
>> Below are snippets from my .html template file.
>>
>> <script language="JavaScript">
>> function myOnLoad()
>> {
>> CWC2OnLoadFunction();
>> goEventManager.registerForEvent('ON_QUERY','myOnQuery');
>> }</script>
>>
>> <script language="JavaScript" type="text/JavaScript">
>> function myOnQuery( nX, nY )
>> {
>> var url = 'ddquery.phtml?x=' + nX + '&y=' + nY + '&sid=' +
>> document.forms[0].sid.value;
>>
>> window.open(url,'eventwin','width=500,height=600,directories=no,location=yes,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes');
>>
>> }
>> </script>
>>
>> .......
>> ......
>>
>> <body class="page" onLoad="myOnLoad()">
>>
>> <form method="post">
>>
>> ......
>>
>
--
~~~~~~~~~~~~~~~~~~~~~~~
David Dabney
OHH Programmer/Database Specialist
NOAA Hollings Marine Lab/JHT
331 Fort Johnson Rd
Charleston, SC 29412
843.762.8984
843.762.8811 receptionist
843.762.8737 fax
david.dabney at noaa.gov
More information about the Chameleon
mailing list