RE: Quick question on session issue (hopefully)
Create a new folder with nothing but a new App.cfm with a unique name along with two more test pages. Chances are, something in your app is causing the problem. Don't feel bad about this either, any time I change the way I do authentication it takes me a short while to remember all the details too. Adrian Building a database of ColdFusion errors at http://cferror.org/ -Original Message- From: Dave Phillips Sent: 15 November 2008 23:30 To: cf-talk Subject: Re: Quick question on session issue (hopefully) Well, that didn't help either. I moved it to another server and it works fine, so apparently my code is not the issue. I restarted ColdFusion and that didn't help the situation either. The bottom line is, my session variables aren't getting persisted, but only on this machine. Again, I've tried with two different browsers, and even verified with firefox that my cookies are there and have the right CFID CFTOKEN. I really need to be able to develop this app locally, so if anyone has any other suggestions, please let me know. Dave Try appending cfid and cftoken to the url before going to your statistics page. If the cfid/cftoken stays the same and your session sticks, then you'll know that something is going on with the cookies. Judah ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315345 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Quick question on session issue (hopefully)
Hey folks, I have a quick question (hopefully). Something weird is going on, and I canât place it, and Iâm feeling like I'm having a brain freezeâ¦. This shouldnât be an issue. I have a simple application in MX 7. Application.cfm has the following: cfapplication name=zarts_tag5 sessionmanagement=true sessiontimeout=#createTimeSpan(7,0,0,0)# applicationtimeout=#createTimeSpan(30,0,0,0)# setclientcookies=true I have an index.cfm with a simple login form (username and password). That form posts to a file called âlogin_exec.cfmâ. This file then authenticates the user and after authentication is successful, I have: cfset session.isAuthorized = true If I put a dump of the session scope right after this, I can see that the variable IS getting set to true. So, after this, I had a CFLOCATION to my statistics.cfm page. But on the statistics.cfm page, a dump revealed that session.isAuthorized was now false. Now, I seemed to remember a bug in MX (or 5.0, canât remember which) that you couldnât do a cflocation after a set of cookies or session variables on a page or you would lose the variables. So, thinking this was my problem, I changed the cflocation to the following: script window.location = âstatistics.cfmâ; /script However, that didnât help the problem. The changes to the session scope that are made in login_exec.cfm are NOT persisting through to the next page, even with a client side re-direct. I have 10+ years experience in CF and the fact that I havenât figured this out yet is driving me nuts. Iâm sure itâs something simple that Iâm just not seeing. I guess hitting 40 will do that to you. :/ Anyone got any ideas where my culprit is? Thanks! Dave ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315326 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Quick question on session issue (hopefully)
Is statistics.cfm on the same domain? Dump out your cfid and cftoken to see if they stay the same on the redirect. ~Brad - Original Message - From: Dave Phillips [EMAIL PROTECTED] To: cf-talk cf-talk@houseoffusion.com Sent: Saturday, November 15, 2008 2:08 PM Subject: Quick question on session issue (hopefully) Hey folks, I have a quick question (hopefully). Something weird is going on, and I canâ?Tt place it, and Iâ?Tm feeling like I'm having a brain freezeâ?¦. This shouldnâ?Tt be an issue. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315327 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Quick question on session issue (hopefully)
Dave, If your browser is blocking cookies and you're not passing in the session tokens, then your session info will be lost. Make sure that the cookies are indeed being used by your browsers and try passing the session tokens to the URL in your window.location call. -Dan On Sat, Nov 15, 2008 at 3:08 PM, Dave Phillips [EMAIL PROTECTED] wrote: Hey folks, I have a quick question (hopefully). Something weird is going on, and I can't place it, and I'm feeling like I'm having a brain freeze . This shouldn't be an issue. I have a simple application in MX 7. Application.cfm has the following: cfapplication name=zarts_tag5 sessionmanagement=true sessiontimeout=#createTimeSpan(7,0,0,0)# applicationtimeout=#createTimeSpan(30,0,0,0)# setclientcookies=true I have an index.cfm with a simple login form (username and password). That form posts to a file called 'login_exec.cfm'. This file then authenticates the user and after authentication is successful, I have: cfset session.isAuthorized = true If I put a dump of the session scope right after this, I can see that the variable IS getting set to true. So, after this, I had a CFLOCATION to my statistics.cfm page. But on the statistics.cfm page, a dump revealed that session.isAuthorized was now false. Now, I seemed to remember a bug in MX (or 5.0, can't remember which) that you couldn't do a cflocation after a set of cookies or session variables on a page or you would lose the variables. So, thinking this was my problem, I changed the cflocation to the following: script window.location = 'statistics.cfm'; /script However, that didn't help the problem. The changes to the session scope that are made in login_exec.cfm are NOT persisting through to the next page, even with a client side re-direct. I have 10+ years experience in CF and the fact that I haven't figured this out yet is driving me nuts. I'm sure it's something simple that I'm just not seeing. I guess hitting 40 will do that to you. :/ Anyone got any ideas where my culprit is? Thanks! Dave ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315328 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Quick question on session issue (hopefully)
To answer both Brad and Dan: Brad: Yes, I have dumped the session and CFID, CFTOKEN and SESSION ID are all the same in both dumps. The dump in login_exec.cfm that shows session.isAuthorized value of true, and the dump in statistics.cfm that shows session.isAuthorized false, right after the client side redirects. Dan: I verified my cookies were on. I have been using IE 7, so I fired up firefox (pun intended) and tried it there. Same result. I even looked at the cookies in Firefox and found both the CFID and the CFTOKEN cookies with the same values that matches my dump. Do you think it has anything to do with developing on http://localhost:8300/ ? I can't imagine as I've done that for years. I'm sure it's something simple I'm missing. But I'm at least glad that no one had an answer yet! (so I don't look dumb) :) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315329 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Quick question on session issue (hopefully)
different application names? On 11/15/08, Dave Phillips [EMAIL PROTECTED] wrote: To answer both Brad and Dan: Brad: Yes, I have dumped the session and CFID, CFTOKEN and SESSION ID are all the same in both dumps. The dump in login_exec.cfm that shows session.isAuthorized value of true, and the dump in statistics.cfm that shows session.isAuthorized false, right after the client side redirects. Dan: I verified my cookies were on. I have been using IE 7, so I fired up firefox (pun intended) and tried it there. Same result. I even looked at the cookies in Firefox and found both the CFID and the CFTOKEN cookies with the same values that matches my dump. Do you think it has anything to do with developing on http://localhost:8300/ ? I can't imagine as I've done that for years. I'm sure it's something simple I'm missing. But I'm at least glad that no one had an answer yet! (so I don't look dumb) :) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315330 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Quick question on session issue (hopefully)
This sounds really simple, but there aren't any hidden cfsets that might be changing your value back are there? Are you on a multi-instance environment where you are hitting two instances and not giving them time to replicate session data? What if you comment out the redirect and manually load page 1 and then page 2 right in a row in two different tabs? If you refresh page 1 again, does it still show true, or has it reverted? ~Brad - Original Message - From: Dave Phillips [EMAIL PROTECTED] To: cf-talk cf-talk@houseoffusion.com Sent: Saturday, November 15, 2008 2:33 PM Subject: Re: Quick question on session issue (hopefully) To answer both Brad and Dan: ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315331 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Quick question on session issue (hopefully)
Same application name. I even tried this: Instead of redirecting, I did the following in login_exec.cfm: cfdump var=#session# cfset session.isAuthorized = true a href=statistics.cfmStatistics/a cfdump var=#session# cfabort When I got to this page, I could see my session.isAuthorized was set to false before the cfset and true after it. Then, I clicked on the statistics link, and the cfdump var=#session# on that page shows: Same application name Same CFID Same CFTOKEN Same Session ID but session.isAuthorized shows false. :( I'm going to try putting the code on another machine to see if it solves the problem or not. I'm pulling my hair out (well, if I had any hair!). Dave ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315333 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Quick question on session issue (hopefully)
Try appending cfid and cftoken to the url before going to your statistics page. If the cfid/cftoken stays the same and your session sticks, then you'll know that something is going on with the cookies. Judah On Sat, Nov 15, 2008 at 1:11 PM, Dave Phillips [EMAIL PROTECTED] wrote: Same application name. I even tried this: Instead of redirecting, I did the following in login_exec.cfm: cfdump var=#session# cfset session.isAuthorized = true a href=statistics.cfmStatistics/a cfdump var=#session# cfabort When I got to this page, I could see my session.isAuthorized was set to false before the cfset and true after it. Then, I clicked on the statistics link, and the cfdump var=#session# on that page shows: Same application name Same CFID Same CFTOKEN Same Session ID but session.isAuthorized shows false. :( I'm going to try putting the code on another machine to see if it solves the problem or not. I'm pulling my hair out (well, if I had any hair!). Dave ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315337 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Quick question on session issue (hopefully)
Well, that didn't help either. I moved it to another server and it works fine, so apparently my code is not the issue. I restarted ColdFusion and that didn't help the situation either. The bottom line is, my session variables aren't getting persisted, but only on this machine. Again, I've tried with two different browsers, and even verified with firefox that my cookies are there and have the right CFID CFTOKEN. I really need to be able to develop this app locally, so if anyone has any other suggestions, please let me know. Dave Try appending cfid and cftoken to the url before going to your statistics page. If the cfid/cftoken stays the same and your session sticks, then you'll know that something is going on with the cookies. Judah ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315339 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4