[Chameleon] $_SESSION not acting like a $_SESSION

Paul Spencer pspencer at dmsolutions.ca
Tue May 24 21:40:53 EDT 2005


this is odd.  First of all, you shouldn't need to include 
session.inc.php in your widget file.  Try removing that.  If stuff now 
starts to break, then it is an indication that something else is failing 
and needs to be resolved.

Cheers

Paul

Bart Wood wrote:
> Hi Everyone,
> I've created a new widget called ZoomQuery that looks like this...
> 
> include_once(dirname(__FILE__)."/../session.inc.php");
> include_once(dirname(__FILE__)."/../NavTool.php");
> 
> class ZoomQuery extends NavTool
> {
>   function ZoomQuery( )
>   {
>     if( ! isset( $_SESSION[ 'ZoomQueries' ] ) )
>     {
>       $this->printAlert( "Creating a BRAND NEW ZoomQuery" );
>       $_SESSION[ 'ZoomQueries' ] = array( );
>       // initialize the array with some stuff....
>     }
>     else
>     {
>       $this->printAlert( "Using the EXISTING ZoomQuery" );
>     }
>   }
> }
> 
> Unfortunately I whenever I do select anything on the web page which
> causes a re-post of the form I create a brand new ZoomQuery because
> the object doesn't appear in the $_SESSION anymore.  The $_SESSION
> acts more like a $_REQUEST object.  Does anyone have any ideas how I
> can fix this problem?  Any help would be appreciated.
> 
> -Bart Wood
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 

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


More information about the Chameleon mailing list