• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

different session contents for the same session, CF9

Community Beginner ,
Sep 03, 2015 Sep 03, 2015

Copy link to clipboard

Copied

Two URLs:

http://DOMAIN/zshowsession.cfm

http://DOMAIN/institutes/office/zshowsession.cfm

The DOMAIN portion is identical.  Same site.  Same CF server.

Both files contain this code:

<cfdump var="#session#">

One outputs this:

session1.png

The other outputs this:

session2.png

You can see it's the same cfid and cftoken, but the contents of session are different.  This is causing me problems.

Is anyone aware of any legitimate reason why this would be happening?  Maybe some weird CF configuration in the CFIDE or something?  I already checked the two relevant Application.cfc files (one in /, one in /institutes) and there is nothing that modifies the session.

Views

284

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Sep 04, 2015 Sep 04, 2015

I fixed it.  The problem was that the two Application.cfc files had different values for This.name.  When I made them equal the session data became synchronized.

Votes

Translate

Translate
LEGEND ,
Sep 04, 2015 Sep 04, 2015

Copy link to clipboard

Copied

If the application.cfc isn't changing anything in the session, is zshowsession.cfm changing anything?

^_^

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 04, 2015 Sep 04, 2015

Copy link to clipboard

Copied

Nope.  The entire content of both zshowsession.cfm files is this:

<cfdump var="#session#">

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 04, 2015 Sep 04, 2015

Copy link to clipboard

Copied

Look for an application.cfm/cfc in the directory path beyond the one in the app root.  Also, look in the app.cfc file and see if there is anything in there that could be adding the session var.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 04, 2015 Sep 04, 2015

Copy link to clipboard

Copied

I have looked through the entire directory structure up to the root of the drive itself.  There are exactly two Application.* files in play:

/Application.cfc

/institutes/Application.cfc

There are no Application.cfm files, only cfc.

Both of these Application.cfc files contain this constructor (inside of the component, but outside of any function).  The only difference is This.name:

  <cfset This.name = "Institutes">

  <cfset This.Sessionmanagement = true>

  <cfset This.Sessiontimeout = createtimespan(0,0,240,0)>

  <cfsetting requesttimeout="240">

  <cfset This.name = "SumReg">

  <cfset This.Sessionmanagement = true>

  <cfset This.Sessiontimeout = createtimespan(0,0,240,0)>

  <cfsetting requesttimeout="240">

Then they both have onApplicationStart defined which purely sets application variables and nothing else.

That's it.  Nothing that modifies the session.

It's worth noting that the nature of the problem is that if I change something in the session then it only reflects in one location.  If what you suspect was true (that something is changing the session) then I would expect to see any such changes reflected in both locations.  For example, in my OP you can see from the two images that only one session has 'foobar' defined.  I set that in one location to test session consistency and it demonstrated that they are not consistent.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 04, 2015 Sep 04, 2015

Copy link to clipboard

Copied

LATEST

I fixed it.  The problem was that the two Application.cfc files had different values for This.name.  When I made them equal the session data became synchronized.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation