I put CFOUTPUT just after the CFSET stmt and indeed the variable session.allowin was set to true. I also put a CFOUTPUT at the top of my application.cfm and found session.allowin was false. So why is this variable becoming false before it gets to my application.cfm? Do I need to do something to pass the values to it?
-----Original Message----- From: John Wilker [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 1:06 AM To: CF-Talk Subject: RE: login prob Try and drop some <CFOUTPUT> into the code. Or run the app in debug so you can watch SESSION.allowin my guess is a place you think is changing it, isn't. If I am not doing it in debug I put some script alert() to pop up the variables I want to watch. J. John Wilker Web Applications Consultant, Writer Macromedia Certified ColdFusion Developer Founder/President IE CFUG www.red-omega.com Whatever is wrong it is better than a poke in the eye with a sharp stick. Unless of course you just got poked in the eye with a sharp stick. -----Original Message----- From: Mike Miessen [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 9:46 PM To: CF-Talk Subject: RE: login prob I have the login page and the login process page in my root dir. They are now working as designed. Login.cfm calls login_action.cfm which checks the database and allows if the username and password works. It sets session.allowin = true. Then it calls out to the members dir where the member page and the application.cfm is located. Well application.cfm sets session.allowin default to false but it should skip that because it is already set to true supposedly. So then the application.cfm blocks me and I don't know why -----Original Message----- From: John Wilker [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 07, 2003 12:37 AM To: CF-Talk Subject: RE: login prob What happens? Nothing or you get put to the login page? This chunk <cfif CGI.SCRIPT_NAME EQ "/login.cfm"> ---You don't have anything happen here.--- <cfelseif CGI.SCRIPT_NAME EQ "/login_process.cfm"> ---You don't have anything happen here.--- <cfelse> ... Do you set the session.allowin anywhere else prior to this page? Another application.cfm somwhere up the directory tree? J. John Wilker Web Applications Consultant, Writer Macromedia Certified ColdFusion Developer Founder/President IE CFUG www.red-omega.com Whatever is wrong it is better than a poke in the eye with a sharp stick. Unless of course you just got poked in the eye with a sharp stick. -----Original Message----- From: Mike Miessen [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 9:16 PM To: CF-Talk Subject: RE: login prob Well I got some of my problems solved. Mostly it was a directory structure problem. My current problem is that I get logged in and then when it goes to the membersonly directory it runs a cfm page there where I have an application.cfm file with the following code. The problem is that the variable session.allowin does not seem to be set because it blocks me when it checks that in the cfif statement. The process page says I successfully logged in and then when I call the members page the application.cfm blocks me. Any ideas? <!--- Create the user login application ---> <cfapplication name="MyApp" clientmanagement="Yes" sessionmanagement="Yes" sessiontimeout="#CreateTimeSpan(0,0,15,0)#" applicationtimeout="#CreateTimeSpan(0,2,0,0)#"> <!--- Now define that this user is logged out by default ---> <CFPARAM NAME="session.allowin" DEFAULT="false"> <!--- Now if the variable "session.allowin" does not equal true, send user to the login page ---> <!--- the other thing you must check for is if the page calling this application.cfm is the "login.cfm" page and the "Login_process.cfm" page since the Application.cfm is always called, if this is not checked the application will simply Loop over and over. To check that, you do the following call ---> <cfif session.allowin neq "true"> <cfif CGI.SCRIPT_NAME EQ "/login.cfm"> <cfelseif CGI.SCRIPT_NAME EQ "/login_process.cfm"> <cfelse> <!--- this user is not logged in, alert user and redirect to the login.cfm page ---> <script> alert("You must login to access this area!"); self.location="/login.cfm"; </script> </cfif> </cfif> -----Original Message----- From: Mike Miessen [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 11:12 PM To: CF-Talk Subject: RE: login prob Well that didn't change anything. I got this from the easycfm.com tutorial. Hey I thought this was easy LOL -----Original Message----- From: John Wilker [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 10:44 PM To: CF-Talk Subject: RE: login prob If you have a DSN already set up (I asusme you do and it's called users) try using just <CFQUERY Datasource="users" name="qVerify"> John Wilker Web Applications Consultant, Writer Macromedia Certified ColdFusion Developer Founder/President IE CFUG www.red-omega.com Whatever is wrong it is better than a poke in the eye with a sharp stick. Unless of course you just got poked in the eye with a sharp stick. -----Original Message----- From: Mike Miessen [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 7:37 PM To: CF-Talk Subject: RE: login prob Well I took that out of my tag and it does not error but now it does not seem to be checking the database table either because it is not passing me through I'm still trying to understand Peter's response LOL -----Original Message----- From: John Wilker [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 10:23 PM To: CF-Talk Subject: RE: login prob Have you tried taking dbname="#myDSN#" out of your tag? IIRC dbname isn't used anymore, I could be wrong there. I never use it. What CF version? J. John Wilker Web Applications Consultant, Writer Macromedia Certified ColdFusion Developer Founder/President IE CFUG www.red-omega.com Whatever is wrong it is better than a poke in the eye with a sharp stick. Unless of course you just got poked in the eye with a sharp stick. -----Original Message----- From: Mike Miessen [mailto:[EMAIL PROTECTED]] Sent: Monday, January 06, 2003 7:13 PM To: CF-Talk Subject: login prob I keep getting this error but I don't understand whats wrong with my code can anybody tell me? The tag does not have an attribute called dbname. The valid attribute(s) are name, datasource, dbtype, sql, username, password, maxrows, blockfactor, timeout, cachedafter, cachedwithin, debug. The Error Occurred in D:\wwwroot\MembersOnly\Login_Process.cfm: line 9 7 : <body> 8 : <!--- Get all records from the database that match this users credentials ---> 9 : <cfquery name="qVerify" dbname="#myDSN#" datasource="Users" username="#DSNUsername#" password="#DSNPassword#"> 10 : SELECT UserName, Password 11 : FROM users ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=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. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

