AH!  Now we get to a subject...  I have had times where I had to scope my local 
variables to keep them from getting mixed with
client variables, particularly when working with arrays...

For example,

I make an array, serialize it, stuff it into a client variable called "client.myarray"
Later, I deserialize it (on a new page call), the deserialized version is called 
"myarray"

Then I do some operations on the myarray variable (add, edit, whatever)

Then I try to reserialize "myarray" and stuff it into wddx client.myarray....

Now, the next time I try to deserialize it, it says it is not a wddx, or it is 
otherwise corrupt.

What happens is when you try to reserialize myarray, it is actually reserializing 
"client.myarray"

The lesson - Always scope your local variables, especially if you are using them to 
interact with client vars.

David


----- Original Message -----
From: "Owens, Howard" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, April 10, 2002 6:39 PM
Subject: RE: Client Variable Scrabble


> Bryan and David:
>
> Thanks for suggestions. Good one.
>
> Would this be an issue --
>
> I have arrays passing in and out of CFWDDX so I can pass the arrays between
> pages.  There's no point at which the CFWDDX tags are not serielizing or
> deserilizing a non client-scoped variable, nor are variables being passed
> between templates (except part of the same group (called at the same time)
> of includes.  But could there be a moment in time, when variables are just
> local variables, between getting passed between CFWDDX tags when they could
> be vulnerable to getting mixed up?
>
> H.
>
>
> > -----Original Message-----
> > From: Bryan Love [SMTP:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 10, 2002 6:37 PM
> > To: CF-Talk
> > Subject: RE: Client Variable Scrabble
> >
> > First off, why bother setting client cookies at all?? If you pass the CFID
> > and CFTOKEN through the URL and vars are stored in the DB, then why set
> > cookies?  I don't remember off the top of my head whether CF looks for
> > CFID
> > and CFTOKEN in the cookie first, or in the url string, but you might want
> > to
> > investigate.
> >
> > Second, check to make sure that "cfClientstorage" is mapped to the same DB
> > in the CF Administrator on all machines in the cluster.  This is most
> > likely
> > your problem.  If the DSNs are mapped to different DBs then two users
> > might
> > get the same CFID and CFTOKEN if they start their sessions on different
> > machines, then when they switch machines they will switch client vars...
> >
> >
> > -----Original Message-----
> > From: Owens, Howard [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 10, 2002 4:30 PM
> > To: CF-Talk
> > Subject: RE: Client Variable Scrabble
> >
> >
> > Nah, It's IE 5.0 and 5.5
> >
> > H.
> >
> >
> > > -----Original Message-----
> > > From: Owens, Howard [SMTP:[EMAIL PROTECTED]]
> > > Sent: Wednesday, April 10, 2002 4:25 PM
> > > To: CF-Talk
> > > Subject: RE: Client Variable Scrabble
> > >
> > > Thanks, Dave ... I'll check the IE issue ... there is only one
> > > cfapplication
> > > tag for the entire application.
> > >
> > > Here's what it looks like:
> > >
> > >
> > >
> > > <cfapplication name="appname"
> > >                clientmanagement="yes"
> > >                sessionmanagement="no"
> > >                setclientcookies="yes"
> > > clientstorage="cfClientstorage">
> > >
> > >
> > > <cfscript>
> > >
> > >
> > >
> > > H.
> > >
> > >
> > > > -----Original Message-----
> > > > From: David Schmidt [SMTP:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, April 10, 2002 4:37 PM
> > > > To: CF-Talk
> > > > Subject: Re: Client Variable Scrabble
> > > >
> > > > First, double check that all of your cfapplication tags specify the
> > same
> > > > client datasource.  Make sure none are using
> > > > "Registry".  I know you said you are using a database, but just to be
> > > > sure...
> > > >
> > > > Second, are the users using IE6 perhaps?  I've heard some problems
> > that
> > > > IE6 has with cookies at times.
> > > >
> > > > Just a few thoughts.  If I think of anything else, I'll let ya know.
> > > >
> > > > Good Luck,
> > > >
> > > > Dave
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Owens, Howard" <[EMAIL PROTECTED]>
> > > > To: "CF-Talk" <[EMAIL PROTECTED]>
> > > > Sent: Wednesday, April 10, 2002 3:55 PM
> > > > Subject: Client Variable Scrabble
> > > >
> > > >
> > > > > When working in a single-server environment, I've always used
> > session
> > > > > variables to track users.
> > > > >
> > > > > But that session variables don't work in a clustered environment,
> > > which
> > > > is
> > > > > what I'm doing a lot of my development on now.
> > > > >
> > > > > So, based on recommendations of this list, I switched to client
> > > > variables.
> > > > >
> > > > > We launched a new Intranet application today that makes heavy use of
> > > > client
> > > > > variables -- and everything is getting scrambled.  We have multiple
> > > > users
> > > > > going at one time and one user will show up with the data of another
> > > > user.
> > > > >
> > > > > Now I've always been told that you don't lock client vars.  So I'm
> > not
> > > > > locking them.
> > > > >
> > > > > I'm passing #client.urltoken# in ALL URLs and Form variables, plus,
> > > > since
> > > > > this is an intranet, I know all users have cookies enabled and they
> > > are
> > > > all
> > > > > using IE.
> > > > >
> > > > > My client storage is in a database.
> > > > >
> > > > > So, what might be the problem here?  Why are the servers (three in
> > the
> > > > > cluster) losing track of the users?
> > > > >
> > > > > H.
> > > > >
> > > > >
> > > >
> > >
> >
> >
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to