RE: Sessions and CFCs
Some issues here. First, you need to var scope ALL variables not passed in as arguments, so you need to add cfset var verify_login = Now, notice how if verify_login has a recordcount of 0, the session vars won't set. Well, could that be the issue? Are you 100% sure you are sending a valid uname/pword to the method? === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 11:44 AM To: CF-Talk Subject: Re: Sessions and CFCs Rather straight forward function to set the userid and information based on login. I call it once per user. CFFUNCTION NAME=Login RETURNTYPE=boolean CFARGUMENT NAME=Username TYPE=string REQUIRED=yes CFARGUMENT NAME=Password TYPE=string REQUIRED=yes cfquery name=verify_login datasource=#This.DSN# SELECT user_id, nickname, name, password FROM users WHERE Username = #Username# AND password = '#password#' /cfquery cfif verify_login.recordCount cfset session.userid = verify_login.userid cfset session.name = verify_login.name CFreturn 1 CFELSE CFreturn 0 /cfif /CFFUNCTION Micheal, can you show the login method? Also, is the code that calls login being run every hit? == == === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 3:18 AM To: CF-Talk Subject: Re: Sessions and CFCs I've tested it out a few ways to Sunday and the results are always the same. As long as the CFC is cached, only the first 'use' of the CFC will result in any session information being written for the user. Every additional attempt results in no session being written. This is the code. caching: CFIF not IsDefined('Application.CFC.User') cfparam name=Application.cfc default=#structNew()# CFOBJECT NAME=Application.CFC.User COMPONENT=components.user cfinvoke component =#Application.CFC.User# method = Init CFINVOKEARGUMENT NAME=dsn VALUE=#DSN# /CFINVOKE /CFIF call: CFINVOKE COMPONENT=#Application.CFC.User# METHOD=Login RETURNVARIABLE=IsLoggedIn CFINVOKEARGUMENT NAME=Username VALUE=#Username# CFINVOKEARGUMENT NAME=Password VALUE=#Password# /CFINVOKE Is it possible that when I upgraded to 6.1 from the last beta something went wrong? I'm seeing 6,1,0,60662 as the build. On Sunday, Aug 10, 2003, at 21:43 US/Pacific, Michael Dinowitz wrote: Running full release of 6.1 on a machine that was running the beta. Hmm, weird. The page context bug is *definitely* fixed in Red Sky, even in the beta versions! What is this page context bug, where can I read more about it and is there a fix http://www.google.com/search?q=page+context+bugie=UTF-8oe=UT F-8 The fix should be CFMX 6.1! Since that *does* fix the bug, let's see your code... maybe you've got a bug in your code? Sean A Corfield -- http://www.corfield.org/blog/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Sessions and CFCs
The cache setup and the use look OK. What about the CFC itself? I posted it to this thread earlier (in reply to Raymond) Is it possible that when I upgraded to 6.1 from the last beta something went wrong? I'm seeing 6,1,0,60662 as the build. You should see 6,1,0,63958 as the build so it looks like your last upgrade didn't take. OK, that's really strange as the build for the HoF machine is 6,1,0,0 and that was done from scratch (cf5-cfmx -cfmx 6.1) Are you sure about that build number? ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Sessions and CFCs
Running full release of 6.1 on a machine that was running the beta. What is this page context bug, where can I read more about it and is there a fix (or is it just a symptom of me caching the code)? Thanks Michael, are you running RedSky? This sounds like a classic sympton of the page context bug. === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Sent: Sunday, August 10, 2003 3:20 PM To: CF-Talk Subject: Sessions and CFCs OK, here's an interesting one. I have a CFC that I cached into the application scope. All it does is check a users name and password, writes some info to their session and exits. First run, no problem. It works. Second run with a different browser (i.e. a different session) and it fails. For some reason, the CFC was not setting the session information inside the CFC. From what it looks, when I ran the CFC the first time, it took the first session and held it as the only session to use. The second session never had data written to it. Can anyone else try this out and see what they get? I'm using this to cache the CFC. CFIF Not IsDefined('Application.CFC.User') cfparam name=Application.cfc default=#structNew()# CFOBJECT NAME=Application.CFC.User COMPONENT=components.user /CFIF Michael Dinowitz Finding technical solutions to the problems you didn't know you had yet ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Sessions and CFCs
On Sunday, Aug 10, 2003, at 21:43 US/Pacific, Michael Dinowitz wrote: Running full release of 6.1 on a machine that was running the beta. Hmm, weird. The page context bug is *definitely* fixed in Red Sky, even in the beta versions! What is this page context bug, where can I read more about it and is there a fix http://www.google.com/search?q=page+context+bugie=UTF-8oe=UTF-8 The fix should be CFMX 6.1! Since that *does* fix the bug, let's see your code... maybe you've got a bug in your code? Sean A Corfield -- http://www.corfield.org/blog/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Sessions and CFCs
Hi Michael, I show 6,1,0,63958 on all boxes that I've upgraded. Definitely very strange what you're seeing... chris -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 7:17 PM To: CF-Talk Subject: Re: Sessions and CFCs The cache setup and the use look OK. What about the CFC itself? I posted it to this thread earlier (in reply to Raymond) Is it possible that when I upgraded to 6.1 from the last beta something went wrong? I'm seeing 6,1,0,60662 as the build. You should see 6,1,0,63958 as the build so it looks like your last upgrade didn't take. OK, that's really strange as the build for the HoF machine is 6,1,0,0 and that was done from scratch (cf5-cfmx -cfmx 6.1) Are you sure about that build number? ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Sessions and CFCs
yes mike. Debugging Information ColdFusion Server Enterprise 6,1,0,63958 Template /clients/armynavy/cart/cart_display.cfm Time Stamp 11-Aug-03 10:08 PM Locale English (US) User Agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705) Remote IP 127.0.0.1 Host Name 127.0.0.1 tony. -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 10:17 PM To: CF-Talk Subject: Re: Sessions and CFCs The cache setup and the use look OK. What about the CFC itself? I posted it to this thread earlier (in reply to Raymond) Is it possible that when I upgraded to 6.1 from the last beta something went wrong? I'm seeing 6,1,0,60662 as the build. You should see 6,1,0,63958 as the build so it looks like your last upgrade didn't take. OK, that's really strange as the build for the HoF machine is 6,1,0,0 and that was done from scratch (cf5-cfmx -cfmx 6.1) Are you sure about that build number? ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Sessions and CFCs
Michael, are you running RedSky? This sounds like a classic sympton of the page context bug. === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Sent: Sunday, August 10, 2003 3:20 PM To: CF-Talk Subject: Sessions and CFCs OK, here's an interesting one. I have a CFC that I cached into the application scope. All it does is check a users name and password, writes some info to their session and exits. First run, no problem. It works. Second run with a different browser (i.e. a different session) and it fails. For some reason, the CFC was not setting the session information inside the CFC. From what it looks, when I ran the CFC the first time, it took the first session and held it as the only session to use. The second session never had data written to it. Can anyone else try this out and see what they get? I'm using this to cache the CFC. CFIF Not IsDefined('Application.CFC.User') cfparam name=Application.cfc default=#structNew()# CFOBJECT NAME=Application.CFC.User COMPONENT=components.user /CFIF Michael Dinowitz Finding technical solutions to the problems you didn't know you had yet ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Sessions and CFCs
On Monday, Aug 11, 2003, at 02:18 US/Pacific, Michael Dinowitz wrote: I've tested it out a few ways to Sunday and the results are always the same. As long as the CFC is cached, only the first 'use' of the CFC will result in any session information being written for the user. The cache setup and the use look OK. What about the CFC itself? Is it possible that when I upgraded to 6.1 from the last beta something went wrong? I'm seeing 6,1,0,60662 as the build. You should see 6,1,0,63958 as the build so it looks like your last upgrade didn't take. Sean A Corfield -- http://www.corfield.org/blog/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Sessions and CFCs
OK, something is definitely wrong here. I just did the upgrade again and it has not changed the version number. I'm going to do it one more time and use the 'new CF server' setting. Hi Michael, I show 6,1,0,63958 on all boxes that I've upgraded. Definitely very strange what you're seeing... chris -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 7:17 PM To: CF-Talk Subject: Re: Sessions and CFCs The cache setup and the use look OK. What about the CFC itself? I posted it to this thread earlier (in reply to Raymond) Is it possible that when I upgraded to 6.1 from the last beta something went wrong? I'm seeing 6,1,0,60662 as the build. You should see 6,1,0,63958 as the build so it looks like your last upgrade didn't take. OK, that's really strange as the build for the HoF machine is 6,1,0,0 and that was done from scratch (cf5-cfmx -cfmx 6.1) Are you sure about that build number? ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Sessions and CFCs
Micheal, can you show the login method? Also, is the code that calls login being run every hit? === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 3:18 AM To: CF-Talk Subject: Re: Sessions and CFCs I've tested it out a few ways to Sunday and the results are always the same. As long as the CFC is cached, only the first 'use' of the CFC will result in any session information being written for the user. Every additional attempt results in no session being written. This is the code. caching: CFIF not IsDefined('Application.CFC.User') cfparam name=Application.cfc default=#structNew()# CFOBJECT NAME=Application.CFC.User COMPONENT=components.user cfinvoke component =#Application.CFC.User# method = Init CFINVOKEARGUMENT NAME=dsn VALUE=#DSN# /CFINVOKE /CFIF call: CFINVOKE COMPONENT=#Application.CFC.User# METHOD=Login RETURNVARIABLE=IsLoggedIn CFINVOKEARGUMENT NAME=Username VALUE=#Username# CFINVOKEARGUMENT NAME=Password VALUE=#Password# /CFINVOKE Is it possible that when I upgraded to 6.1 from the last beta something went wrong? I'm seeing 6,1,0,60662 as the build. On Sunday, Aug 10, 2003, at 21:43 US/Pacific, Michael Dinowitz wrote: Running full release of 6.1 on a machine that was running the beta. Hmm, weird. The page context bug is *definitely* fixed in Red Sky, even in the beta versions! What is this page context bug, where can I read more about it and is there a fix http://www.google.com/search?q=page+context+bugie=UTF-8oe=UTF-8 The fix should be CFMX 6.1! Since that *does* fix the bug, let's see your code... maybe you've got a bug in your code? Sean A Corfield -- http://www.corfield.org/blog/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Sessions and CFCs
Rather straight forward function to set the userid and information based on login. I call it once per user. CFFUNCTION NAME=Login RETURNTYPE=boolean CFARGUMENT NAME=Username TYPE=string REQUIRED=yes CFARGUMENT NAME=Password TYPE=string REQUIRED=yes cfquery name=verify_login datasource=#This.DSN# SELECT user_id, nickname, name, password FROM users WHERE Username = #Username# AND password = '#password#' /cfquery cfif verify_login.recordCount cfset session.userid = verify_login.userid cfset session.name = verify_login.name CFreturn 1 CFELSE CFreturn 0 /cfif /CFFUNCTION Micheal, can you show the login method? Also, is the code that calls login being run every hit? === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email: [EMAIL PROTECTED] Blog : www.camdenfamily.com/morpheus/blog Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 3:18 AM To: CF-Talk Subject: Re: Sessions and CFCs I've tested it out a few ways to Sunday and the results are always the same. As long as the CFC is cached, only the first 'use' of the CFC will result in any session information being written for the user. Every additional attempt results in no session being written. This is the code. caching: CFIF not IsDefined('Application.CFC.User') cfparam name=Application.cfc default=#structNew()# CFOBJECT NAME=Application.CFC.User COMPONENT=components.user cfinvoke component =#Application.CFC.User# method = Init CFINVOKEARGUMENT NAME=dsn VALUE=#DSN# /CFINVOKE /CFIF call: CFINVOKE COMPONENT=#Application.CFC.User# METHOD=Login RETURNVARIABLE=IsLoggedIn CFINVOKEARGUMENT NAME=Username VALUE=#Username# CFINVOKEARGUMENT NAME=Password VALUE=#Password# /CFINVOKE Is it possible that when I upgraded to 6.1 from the last beta something went wrong? I'm seeing 6,1,0,60662 as the build. On Sunday, Aug 10, 2003, at 21:43 US/Pacific, Michael Dinowitz wrote: Running full release of 6.1 on a machine that was running the beta. Hmm, weird. The page context bug is *definitely* fixed in Red Sky, even in the beta versions! What is this page context bug, where can I read more about it and is there a fix http://www.google.com/search?q=page+context+bugie=UTF-8oe=UTF-8 The fix should be CFMX 6.1! Since that *does* fix the bug, let's see your code... maybe you've got a bug in your code? Sean A Corfield -- http://www.corfield.org/blog/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Sessions and CFCs
I've tested it out a few ways to Sunday and the results are always the same. As long as the CFC is cached, only the first 'use' of the CFC will result in any session information being written for the user. Every additional attempt results in no session being written. This is the code. caching: CFIF not IsDefined('Application.CFC.User') cfparam name=Application.cfc default=#structNew()# CFOBJECT NAME=Application.CFC.User COMPONENT=components.user cfinvoke component =#Application.CFC.User# method = Init CFINVOKEARGUMENT NAME=dsn VALUE=#DSN# /CFINVOKE /CFIF call: CFINVOKE COMPONENT=#Application.CFC.User# METHOD=Login RETURNVARIABLE=IsLoggedIn CFINVOKEARGUMENT NAME=Username VALUE=#Username# CFINVOKEARGUMENT NAME=Password VALUE=#Password# /CFINVOKE Is it possible that when I upgraded to 6.1 from the last beta something went wrong? I'm seeing 6,1,0,60662 as the build. On Sunday, Aug 10, 2003, at 21:43 US/Pacific, Michael Dinowitz wrote: Running full release of 6.1 on a machine that was running the beta. Hmm, weird. The page context bug is *definitely* fixed in Red Sky, even in the beta versions! What is this page context bug, where can I read more about it and is there a fix http://www.google.com/search?q=page+context+bugie=UTF-8oe=UTF-8 The fix should be CFMX 6.1! Since that *does* fix the bug, let's see your code... maybe you've got a bug in your code? Sean A Corfield -- http://www.corfield.org/blog/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Sessions and CFCs
On Sunday, Aug 10, 2003, at 14:19 US/Pacific, Michael Dinowitz wrote: OK, here's an interesting one. I have a CFC that I cached into the application scope. All it does is check a users name and password, writes some info to their session and exits. First run, no problem. It works. Second run with a different browser (i.e. a different session) and it fails. That's the page context bug. Upgrade to Red Sky and the problem will go away. Sean A Corfield -- http://www.corfield.org/blog/ If you're not annoying somebody, you're not really alive. -- Margaret Atwood ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4