onSessionStart method runs on every request!??
having some difficulty with a remote server running the onSessionStart method on every request. Note: this works perfectly in development.
I have this in my application cfc - note where I am dumping the session variable to screen for debugging. what I have noticed is that the onSessionStart method runs every time, resetting the users login [user can;t log in] it used to give a new session id every request, now that has stopped, but no closer to a solution:
<!--- session handling --->
<cffunction name="onSessionStart" output="true" access="public" >
<cflock scope="session" timeout="5" type="Exclusive">
<cfscript>
Session.starttime = now();
session.authenticated = "false";
session.authattempts = 0;
Session.shoppingCart = ArrayNew(2);
</cfscript>
</cflock>
Session start<cfdump var="#session#" /><br />
</cffunction>
<cffunction name="onSessionEnd" output="false" access="public" >
Session end<cfdump var="#session#" /><br />
</cffunction>
<!--- request handling --->
<cffunction name="onRequestStart" output="true" access="public" >
<cfargument name="requestname" required=true/>
request start<cfdump var="#session#" /><br />
<cfparam name="message" default="" />
<cfparam name="success" default="" />
<cfparam name="error" default="" />
<cfif session.authenticated is not session.sessionid >
<cfinclude template="./login.cfm" />
</cfif></cffunction>
<cffunction name="onRequest" output="yes" >
<cfargument name="targetPage" type="String" required="true" />
the request<cfdump var="#session#" /> <br />
<cfif session.authenticated is session.sessionid>
<cfscript>
if (IsDefined("url.delFromCart")){
cart_obj = CreateObject("component", "cfc.cart");
cart_obj.delFromCart(url.delFromCart);
}
</cfscript>
<cfsavecontent variable="myContent">
<cfinclude template="..#arguments.targetPage#" />
</cfsavecontent>
<cfoutput>#myContent#</cfoutput>
</cfif>
</cffunction>
<cffunction name="onRequestEnd" output="yes" access="public" >
request end<cfdump var="#session#" /> <br />
</cffunction>
Has anyone seen this? must be a server error right?
HELP!!
-sean
