[Chameleon] Dynamic query result sid error

Paul Spencer pspencer at dmsolutions.ca
Wed May 4 17:37:15 EDT 2005


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">
> 
> ......
> 

-- 
+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+


More information about the Chameleon mailing list