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:
The other outputs this:
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.
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.
Copy link to clipboard
Copied
If the application.cfc isn't changing anything in the session, is zshowsession.cfm changing anything?
^_^
Copy link to clipboard
Copied
Nope. The entire content of both zshowsession.cfm files is this:
<cfdump var="#session#">
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.
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.
Copy link to clipboard
Copied
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.