Re: Comprehensive article on how CFID and CFTOKEN work?
I'm building a cart-like application where I intend to store the (usually anonymous) user's intra-session web site state in a database table. Using cfid and cftoken are the obvious choice to use to ID a given user's state (I do realize that it would be system-unique and wouldn't follow the user across computers, which is fine) when stored in the database, but I feel like my understanding of how (and when) CFID's and CFTOKEN's are created is incomplete. Is there a comprehensive guide to the how's and why's of cfid and cftoken available online? Thanks, Pete Pete, I'll take a crack at this based on all that I recall and about 14 years of experience with ColdFusion. =) CFID and CFTOKEN are set as persistent cookies by ColdFusion. This means that, assuming the end user has cookies enabled, the cookies are set and will retain the originally set value until they are specifically cleared by the end user. So, if a user visits your site for the very first time, ColdFusion will assign a new set of CFID and CFTOKEN values via a pair of cookies. CFID is assigned sort of like an identity or autonumber, while CFTOKEN may be set in two different ways. By default, CFTOKEN will be set as an 8-digit random number. However, there's an option in the ColdFusion Administrator under the Settings menu to assign CFTOKEN as a UUID instead of a random number. And if you're dealing with a cluster of servers that might have unique host names but the same domain name, there's a boolean argument for the cfapplication tag called setdomaincookies (default: false) which will set the CFID and CFTOKEN cookies as domain-level cookies so that any hostname on that domain can read/write/share them. Back many years ago, it used to be that there was a section in the registry where the seed value for CFID was stored and could be altered or reset. These days, I'm not sure off the top of my head if that still exists. Hope that helps. -Tyson -- Tyson Vanek Principal Consultant Webapper Services, LLC http://www.webapper.com/ ~| 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:317763 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Comprehensive article on how CFID and CFTOKEN work?
I'm building a cart-like application where I intend to store the (usually anonymous) user's intra-session web site state in a database table. Using cfid and cftoken are the obvious choice to use to ID a given user's state (I do realize that it would be system-unique and wouldn't follow the user across computers, which is fine) when stored in the database, but I feel like my understanding of how (and when) CFID's and CFTOKEN's are created is incomplete. Is there a comprehensive guide to the how's and why's of cfid and cftoken available online? Thanks, Pete Pete, I'll take a crack at this based on all that I recall and about 14 years of experience with ColdFusion. =) CFID and CFTOKEN are set as persistent cookies by ColdFusion. This means that, assuming the end user has cookies enabled, the cookies are set and will retain the originally set value until they are specifically cleared by the end user. So, if a user visits your site for the very first time, ColdFusion will assign a new set of CFID and CFTOKEN values via a pair of cookies. CFID is assigned sort of like an identity or autonumber, while CFTOKEN may be set in two different ways. By default, CFTOKEN will be set as an 8-digit random number. However, there's an option in the ColdFusion Administrator under the Settings menu to assign CFTOKEN as a UUID instead of a random number. And if you're dealing with a cluster of servers that might have unique host names but the same domain name, there's a boolean argument for the cfapplication tag called setdomaincookies (default: false) which will set the CFID and CFTOKEN cookies as domain-level cookies so that any hostname on that domain can read/write/share them. Back many years ago, it used to be that there was a section in the registry where the seed value for CFID was stored and could be altered or reset. These days, I'm not sure off the top of my head if that still exists. Hope that helps. -Tyson -- Tyson Vanek Principal Consultant Webapper Services, LLC http://www.webapper.com/ ~| 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:317764 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Listcontains question
Try using the listFind() function instead. -Tyson -Original Message- From: van Wyk, Carlo [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 4:28 AM To: CF-Talk Subject: Listcontains question Hi I have the following piece of code that checks to see if a user can see a specific pageid or not. Unfortunately it is not doing the job as I have a list that looks something like this: 4,14,3,2,8,44 If the user is allowed to see page 4, then he would be able to see all pages that contains a 4, so it does not work correctly. cfif listcontains(newlist, #pageid#) cfinclude template=#page# cfelse cfoutput #application.securityerror# /cfoutput /cfif Regards Carlo FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CF eating up RAM
Make sure you're locking all your shared-scope variables. Writing code without properly locking on shared-scope variables can cause serious memory leaks in ColdFusion. If you're not familiar with this practice, I would suggest reading the following two articles. ColdFusion Locking Best Practices by Jim Schley http://www.allaire.com/handlers/index.cfm?id=17318method=full Locking in ColdFusion by Ben Forta http://www.allaire.com/handlers/index.cfm?ID=17196Method=Full 90% of the time I've been called in to address RAM eating behavior on a ColdFusion server, this is the primary contributor to the leaking behavior. -Tyson -Original Message- From: nyon [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 9:48 PM To: CF-Talk Subject: Re: CF eating up RAM Hi, I notice that the cold fusion service is slowly eating up my RAM. After 18 days, it consumes about 22MB of RAM from a lowly figure of 5MB. I have installed service pack for CF 4.5.1. Any solutions ? Nyon FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists ~~ 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 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Duplicate and StructCopy
An interesting scenario that should be considered. Given the following code example: 01: cfscript 02: arrTest1 = arrayNew(1); 03: 04: arrTest1[1] = foo1; 05: arrTest1[2] = foo2; 06: arrTest1[3] = foo3; 07: arrTest1[4] = structNew(); 08: arrTest1[4]['0001'] = 1; 09: arrTest1[4]['0002'] = 2; 10: arrTest1[4]['0003'] = 3; 11: arrTest1[4]['0004'] = 4; 12: arrTest1[4]['0005'] = 5; 13: 14: arrTest2 = arrTest1; 15: 16: arrTest2[1] = foo1_2; 17: arrTest2[4]['0005'] = 5_2; 18: /cfscript 18: 19: cflock scope=server type=readonly timeout=30 20: cfset intColdFusionVersion = listFirst(server.coldfusion.productversion) 21: /cflock 22: 23: cfif intColdFusionVersion eq 5 24: cfdump var=#arrTest1# 25: hr 26: cfdump var=#arrTest2# 27: cfelse 28: cfoutput 29: arrTest1[1] = #arrTest1[1]#br 30: arrTest2[1] = #arrTest2[1]#br 31: hr 32: arrTest1[4]['0005'] = #arrTest1[4]['0005']#br 33: arrTest2[4]['0005'] = #arrTest2[4]['0005']#br 34: /cfoutput 35: /cfif Although arrTest1 and arrTest2 are arrays, the variable set on line #14 creates a copy of the array but a pointer reference to the embedded structure. You'll see that when you output the embedded simple value from each array, they will have been changed independantly. However, you'll find that the change made to the embedded structure in the second array also changes the structure in the first array. As a best practice, you should always run a code example like the one above if you are uncertain if your variable set need to use the duplicate() function. Better safe than sorry. :) Hope this helps, Tyson -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 13, 2001 9:37 AM To: CF-Talk Subject: RE: Duplicate and StructCopy Duplicate() is used with CFSET to copy a complex variable (query, array or structure). If you don't use Duplicate() then the copy is not a real copy, but a pointer back to the original - this can cause problems with shared-scope variables (application, session, server). Arrays aren't complex variables, so they are passed by value anyway. I made the same mistake myself; I thought they were complex variables. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: E-Commerce...? Duane Boudreau FIRED by client
No doubt. People whine about someone posting a JRun-related question to this list but will let this childish slamming go on here instead? Geesh. -Original Message- From: Kurt Ward [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 13, 2001 10:06 AM To: CF-Talk Subject: RE: E-Commerce...? Duane Boudreau FIRED by client Take it elsewhere children. -Original Message- From: Duane Boudreau [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 13, 2001 10:35 AM To: CF-Talk Subject: RE: E-Commerce...? Duane Boudreau FIRED by client I hate to break the news to you Mike Randolph but I'm still employed by my client full time. Yes there are hard feelings but only because I am forced to work with your product! Duane -Original Message- From: Mike Randolph [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 12, 2001 5:06 PM To: CF-Talk Subject: Re: E-Commerce...? Duane Boudreau FIRED by client Hello Everyone, I'm done listening to Duane Boudreau chiming in... About AbleCommerce. When Duane dropped the ball on an AbleCommerce project and was FIRED by the client he was obviously left with some hard feelings ...The project was quickly done by a real CF Programmer. (being as PC as I can be) Out techical support is second to NONE, we answer our phone we quickly resolve issues. You don't get a real company to stand behind a product for free. We were recently reviewed against IBM and Microsoft's commerce products and did very well. Thanks, Mike Randolph CEO of AbleCommerce Duane Boudreau wrote: Ian, If you plan to do any customization of the product yourself, I would strongly advise against ablecommerce. Unfortunately, I've had the displeasure of working with and customizing ACB 2.6-2.9 for the past 9 months and here are just some of the things I've found. Its expensive (as compared to apps like CFWebStore). The code is some places is very poorly written and very poorly thought out (being PC as possible here). Maintainability, and ease of customization clearly wasn't a consideration during development. There is little to no documentation and good luck trying to secure a database diagram from the folks at ACB. I tried for almost a month and all they would give me is some marketing documents. I would never recommend ACB to anyone! JMHO, Duane -Original Message- From: Mark Campbell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 12, 2001 1:13 PM To: CF-Talk Subject: Re: E-Commerce...? Ian ,I would look at this company's offering. http://ablecommerce.com/ Mark Campbell Ian Lurie wrote: I know this has been asked before, but here goes: Anyone out there know a good e-commerce product, preferably easily customized, that can handle a fairly large store (500-1000 products)? Thanks, Ian Portent Interactive http://www.portentinteractive.com Combining process, design, content to create great web sites since 1995 ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Duplicate and StructCopy
Thanks for that, Ray. :) Actually, I only threw that in because I run CF5, but figured many people on the list might run CF4. Good catch, nonetheless. -Tyson -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 13, 2001 12:55 PM To: CF-Talk Subject: RE: Duplicate and StructCopy 19: cflock scope=server type=readonly timeout=30 20: cfset intColdFusionVersion = listFirst(server.coldfusion.productversion) 21: /cflock 22: 23: cfif intColdFusionVersion eq 5 24: cfdump var=#arrTest1# 25: hr 26: cfdump var=#arrTest2# 27: cfelse 28: cfoutput An off topic comment on the code block above. Doing code like this, where you have a code branch for CF5 and a code branch for 5, will result in an error if you turn on strict attribute validation. We ran across this in a Spectra template and had to move the CF5 code into an include. Like so: CFIF CF5 CFINCLUDE ... CFELSE old code /CFIF Just something to watch out for. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Terrorist and gas shortage
I agree. Not that I am apathetic to what has taken place, but this it NOT the place to discuss these issues. PLEASE take these topics and messages elsewhere. Another mailing list could easily be created and joined by those that are interested in having these discussions and voicing opinions. List admins, I'll make another request that this be addressed. Regards, Tyson -Original Message- From: Adkins, Randy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 12, 2001 10:12 AM To: CF-Talk Subject: RE: Terrorist and gas shortage I as much as everyone else is truly sad by the horrid events that took place. However, please keep in mind this list if related to CF. Can we move the topic to CF-Community or elsewhere? Don't get me wrong, I am in the same boat as everyone else and just as upset at the terrorist attack and the price gauging. However I do not feel this is the place for the thread. -Original Message- From: Rich Tretola [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 12, 2001 11:00 AM To: CF-Talk Subject: RE: Terrorist and gas shortage Those store and gas station owners who are gauging prices should be arrested. They are just GREEDY BASTARDS and they now have bad karma and will have to deal with that later. What comes around goes around. Rich -Original Message- From: Terri Stocke [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 12, 2001 10:49 AM To: CF-Talk Subject: RE: Terrorist and gas shortage Same situation here (metro Detroit). I filled up at 6:00 p.m., and could barely pull into the station. Gas was 1.57 then. An hour later it was 1.68. This morning on my way to work the same gas station went to 1.76. Relatives in other cities have told me that in some parts of Detroit and neighboring suburbs it has jumped to $5.00 a gallon! We have seen reports on grocery store runs, but I think that that will wane as the initial panic subsides. There really would be no reason to do such a thing, but I think it's human nature. I do find it interesting that when we hear of oil prices going down and wonder why it takes so long for that price drop to be reflected at our gas stations we hear the station owners say Well, it takes quite awhile for the oil prices to affect our price, but when the prices go UP, we see the price change within a matter of hours. Original Message Follows From: Matthew W Jones [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: RE: Terrorist and gas shortage Date: Tue, 11 Sep 2001 15:23:46 -0500 gas just jumped from 1.50 to 3.50 per gallon around here -Original Message- From: P Broussard [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 11, 2001 2:53 PM To: CF-Talk Subject: Terrorist and gas shortage I live in the Midwest and _every_one_ is freaking out. There are gas lines out into the streets because people think the government is going to shut down the pipe lines or that the terrorist are going to blow them up! It's bad enough the gas stations jacked the gas prices up 20 cents because of it. I am waiting for them to start a run on the grocery stores. Is anyone else seeing this kind of behavior? I refuse to give in to it but who knows I guess they could be right. Phillip ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFLOCK and Session variables
What version of ColdFusion are you running, Brian? The SCOPE attribute of the CFLOCK tag was not introduced until (group, correct me if I'm wrong here) ColdFusion version 4.5. If you're running a version earlier than this, you'll need to use named locks instead of scoped locks. You can find out what version of ColdFusion is being run by logging into the ColdFusion Administrator and clicking on the Version Info link in the left-hand navigation menu (or, if you're running ColdFusion 5, it's on the top menu across the page). Regards, Tyson -Original Message- From: Yager, Brian T Contractor/NCCIM [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 2:27 PM To: CF-Talk Subject: CFLOCK and Session variables I know we have discussed this a good bit lately but I am still needing some understanding. In my application, I make MANY session variables. I use these variables to check certain things on many pages. Because of the past threads on this I have surrounded them with CFLOCK tags. NowCan someone explain the proper way to use them? What I mean is, I have tried giving them the scope of SESSION but it doesn't work. I get an error when I do this. Also, the 'throwontimeout'...if I were to say yes...where would it go? Here is an example of what I am doing cflock timeout=35 throwontimeout=No name=Getthelogin type=READONLY cfif IsDefined(Session.login) cfquery name=Get_login datasource=#DSN# dbtype=ODBCSELECT * FROM Customer_tbl WHERE cust_key = #Session.login#/cfquery cfcookie name=login value=#get_login.cust_key# expires=NEVER /cfif /cflock Is this the correct way to do it? Thanks, Brian Yager President - North AL Cold Fusion Users Group Sr. Systems Analyst NCCIM/CIC [EMAIL PROTECTED] (256) 842-8342 ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Checking for NULL
Try this: cfif not len(trim(qQuery.strField)) it's null cfelse it's not null /cfif -Tyson -Original Message- From: Thomas Chiverton [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 05, 2001 9:48 AM To: CF-Talk Subject: Checking for NULL How do I compare a field for a NULL value ? cfif qQuery.field is NULL ? Regards, Thomas Chiverton Intranet Architect 01565 757 909 The web is the borderless embodiment of every abstraction ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Off topic posts was (OT?) TomCat vs JRun
It's a question about another Allaire (I STILL can't mutter the word Macromedia) product, so how far off topic is it, really? He marked his post as off-topic. I would recommend that if you can't stand off-topic posts (even though it's not that far off topic), perhaps you should build a filter or a rule that scans messages on this mailing for the case-sensitive string OT and files them in the garbage. Better yet, just don't read them. Simple question, simple answer. :) -Tyson -Original Message- From: Zac Belado [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 04, 2001 5:07 PM To: CF-Talk Subject: Off topic posts was (OT?) TomCat vs JRun (OT?) TomCat vs JRun No question at all. Its totally OT. What do people think about the increasing number of off topic posts on this list? Should they be tolerated as long as they are marked as OT? Or should we be actively trying to ensure that the signal to noise ratio on this list stays low by asking that people not post off topic material? ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Off topic posts was (OT?) TomCat vs JRun
Where else (aside from a JRun mailing list, of course) would you expect to find more knowledge about JRun than in the community of people built around it's flagship relative - ColdFusion? Not to mention the fact that many on-topic threads eventually deteriorate into off-topic post discussions. -Tyson -Original Message- From: Zac Belado [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 04, 2001 5:39 PM To: CF-Talk Subject: RE: Off topic posts was (OT?) TomCat vs JRun I for one welcome SOT posts. I've never been one to wear CF blinders. Certainly valid in a general sense but I'm not sure if that is an valid comment for a list whose purpose is the discussion of CF related matters. I'm pretty darned interested in Tomcat myself (to drag this back to the context in which it was originally posted) but is CF-talk the place to be discussing this? Is the community list better? ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
OT? Macromedia Spectra
So I'm wondering now what the official situation with Spectra is? My company is currently talking about designing a content management tool to use for our clients. The more and more we talk about it, the more and more I'm reminded of Spectra. I'd hate to re-invent the wheel at this point. I noticed the Spectra Community site that launched, which is great. But, is it still possible now for companies to purchase Spectra? Is it now available as a free download instead? If I did have to purchase it, is that even an option and is it at the same cost it was previously sold at? I'm still not quite clear what the scenario is here. Any MACR reps care to comment on this? Thanks in advance, Tyson ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: fieldnames structure
Deana, You're close. The FORM scope itself is actually just one big structure, which means you can copy it and pass it along. You'll likely, however, need to convert it to something that can be passed in the form hidden field - I'd recommend WDDX. Try something like this. !--- copy the form scope from the previous page submission --- cfset stcPage1 = structCopy(form) !--- encode it as a WDDX packet --- cfwddx action=cfml2wddx input=#stcPage1# output=wstcPage1 !--- embed it in the form on page 2 --- cfoutput input type=hidden name=stcPage1 value=#wstcPage2# /cfoutput This will pass the struct as a WDDX packet named wstPage1. In order to access the values of the struct on the next page, you'll need to de-serialize it first, like this (this would be in the submit logic on page 2): cfwddx action=wddx2cfml input=#form.wstcPage1# output=stcPage1 Then you should be able to reference fields from page one in the following manner: cfoutput #stcPage1.strFormField1#br #stcPage1.strFormField2#br /cfoutput Hope this helps, Tyson -Original Message- From: Deanna Schneider [mailto:[EMAIL PROTECTED]] Sent: Friday, August 31, 2001 10:38 AM To: CF-Talk Subject: fieldnames structure Hi Folks, I'm trying to figure out this structure thing, and I have a project where I have to grab all the fieldname/value pairs from one form, hold them while the user fills out a second page, then send them along in a hidden field to the action page. What's the best way to do this? I thought I could just do something like: input type=hidden name=page1struct value=#structcopy(form.fieldnames)# But that throws an error. -d Deanna Schneider Interactive Media Developer [EMAIL PROTECTED] ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: negative numbers
cfset intFoo = -3 cfif isNumeric(intFoo) and intFoo lte 0 the value is 0 or a negative number /cfif -Tyson -Original Message- From: Joshua Tipton [mailto:[EMAIL PROTECTED]] Sent: Friday, August 31, 2001 5:07 PM To: CF-Talk Subject: negative numbers I want to check to see if this value is a 0 or a negative number. How would I do this? ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: IIF and DE
Not exactly. IIF() creates an IF/ELSE scenario which, technically speaking, could be considered two statements even though only one of them actually has a condition defined. Fact of the matter is, this comes down to what's called short circuit logic. In most languages in any if/else pair, once a match with one of the if clauses is established, the rest of the if/else statement is simply ignored - commonly referred to as short circuiting. You'll find that ColdFusion works this way with CFIF, CFELSEIF and CFELSE. However, in the case of IIF(), ColdFusion doesn't short circuit which means that it tries to validate the entire statement block, even though only part of it actually needs to execute. Consider the following two code examples. The first one will run without any errors, but the second one, while performing the same logic, will fail. This is because the first scenario gets short circuited and the second one does not. ---[ begin example 1 ]--- cfset strFoo = foo cfif isDefined(strFoo) and len(trim(strFoo)) cfoutputstrFoo = #strFoo#/cfoutput cfelse cfoutputstrFoo2 = #strFoo2#/cfoutput /cfif ---[ end example 1 ]--- ---[ begin example 2 ]--- cfset strFoo = foo cfoutput #iif(isDefined(strFoo) and len(trim(strFoo)),de(strFoo),de(strFoo2))# /cfoutput ---[ end example 2 ]--- Hope that makes sense and/or helps. :) -Tyson -Original Message- From: Brent Goldman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 8:05 PM To: CF-Talk Subject: RE: IIF and DE Hi, Good idea, but I think you missed the problem. There is not two different expressions to evaluate to be TRUE or FALSE as in your example -- just the isDefined function. CF shouldn't be executing the ... blah blah blah ..., but it does, and that is the problem. -Brent -Original Message- From: Tyson Vanek [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 5:57 PM To: CF-Talk Subject: RE: IIF and DE This goes back to the way the old CFIF used to behave. In the past (I think up until CF ver 4.5), the same problem existed with CFIF. Here's an example. Say that the parameter strFoo doesn't exist, consider the following code: cfif isDefined(strFoo) and len(trim(strFoo)) ... blah blah blah ... cfelse ... blah2 blah2 blah2 ... /cfif In the past, ColdFusion would choke on the CFIF statement when strFoo was not defined, even though you'd expect it to immediately jump to the CFELSE statement once the isDefined() returned false. I believe this was fixed with the release of ColdFusion 4.5 - I might be wrong on the version number. My guess is that this behavior is still leftover in the iif() function. I've noticed this in my own development as well that I never seem to be able to use an isDefined() check in an iif() block. Doing so always results in the Error resolving parameter error. A workaround would be to set a default for the variable using CFPARAM and then changing your iif() logic. Here's an example: cfparam name=attributes.order default= cfset orderString = iif(len(trim(attributes.order)),de(amp;order=#attributes.order#),) cflocation url=index.cfm?fuseaction=tools#orderString# Hope this helps, Tyson -Original Message- From: Brent Goldman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 7:36 PM To: CF-Talk Subject: IIF and DE Hi, I'm trying to use IIF with DE, and it doesn't seem to be working. My code: cfset orderString = iif(isDefined(attributes.order), DE(amp;order=#attributes.order#), ) cflocation url=index.cfm?fuseaction=tools#orderString# What I am trying to do is this: if a certain variable is defined (attributes.order), then create a string that can be appended to a URL, otherwise make the string blank. The desired results: - If attributes.order is set to name, then orderString should be set to amp;order=name - If attributes.order is undefined, then orderString should be set to The problem is that when attributes.order is undefined, ColdFusion still tries to execute the code that should be executed if the first expression was true, thus giving an error. CF is trying to find the value of attributes.order in the DE(amp;order=#attributes.order#) statement, even though attributes.order is undefined, and that statement should go with being evaluated. This problem is kinda hard to explain, but does anyone have any idea on how to fix this??? (without having to use CFIF/CFELSE - the whole point is that I want to use IIF and DE) Thanks -Brent ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Encrypt and Decrypt function
Chris, Take a look at some of the past messages in this thread. There was a whole discussion on this a few days ago. A few people proposed potential solutions to the issue you're describing. In my own opinion, this is a problem with the encrypt() function (here we go again, Ray... :)), but there are viable workarounds and solutions. Good luck, Tyson -Original Message- From: Chris Bohill [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 9:36 AM To: CF-Talk Subject: RE: Encrypt and Decrypt function Hi all. Are there any known Bugs associated with the Encrypt and Decrypt function. We have used these functions to encrypt variables that we are passing through as URL's. 95% of the time this works fine, but sometimes we get the following message, or similar messages. Two minutes later it will be working again. It jsut seems to be very tempermental. Has anyone had any experience of this? Does it have anything to do with the connection to the server? Feedback and advice would be greatly appreciated as if this cannot be trusted to work 100% of the time, then it is not much use to us in the application. Someone did mention CFUSION_encrypt but have been warned against using this as it is an unofficial function. The error message we have been getting is: An error occurred while evaluating the expression: CI = Decrypt(ToString(ToBinary(URL.Card_Id)),secret_key) The value to be decrypted is not valid Chris Bohill WEB APPLICATIONS DEVELOPER Biznet Head Office 133-137 Lisburn Road, Belfast Northern Ireland BT9 7AG T +44 (0) 28 9022 3224 F +44 (0) 28 9022 3223 E mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] W http://www.biznet-solutions.com/ biznet-solutions.com ** If you are not the intended recipient, or person responsible for delivering it to the intended recipient, you are not authorized to and must not disclose, copy, distribute or retain this message or any part of it. The opinions / views / comments on this e-mail do not necessarily reflect any views or policies of biznet The recipient should check this email and any attachments for the presence of viruses. biznet accepts no liability for any damage caused by any virus transmitted by this email. biznet 2001. ** ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: IIF and DE
Dave, Maybe it's just me (it's still early), but I don't understand how your example with evaluate() can be considered a workaround for a parameter that doesn't exist. Using the example you specified still results in the same error. Here was Brent's original code (the source of this whole thread): cfset orderString = iif(isDefined(attributes.order),DE(amp;order=#attributes.order#), ) cflocation url=index.cfm?fuseaction=tools#orderString# If I'm understanding your workaround example correctly, here's what you're proposing instead: cfset orderString = iif(isDefined(attributes.order),DE(#evaluate('amp;order=#attributes.orde r#')#), ) cflocation url=index.cfm?fuseaction=tools#orderString# Both of these code example produce the exact same result - Error resolving parameter attributes.order Am I missing something? :) Regards, Tyson -Original Message- From: Dave Feltenberger [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 9:41 AM To: CF-Talk Subject: RE: IIF and DE ColdFusion doesn't validate the entire statement block per se, it's just that the variables you pass in are parameters to a function and have to exist in order to pass in. Hence the workaround I sent before of using evaluate(). Other languages that short circuit in if/else if/else blocks still have to have variables defined in order to pass into functions - there's no magic there - it just skips the rest of the block once it matches a condition specified. The compiler will complain if the variables aren't defined ahead of time in languages like C, C++, Java, etc., and since you don't have the option of compiling ColdFusion (as far as I know, anyway) to rid yourself of errors like this, you hit the problem at run-time. IIF does in fact short circuit like it's supposed to. -Original Message- From: Tyson Vanek [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 10:31 AM To: CF-Talk Subject: RE: IIF and DE Not exactly. IIF() creates an IF/ELSE scenario which, technically speaking, could be considered two statements even though only one of them actually has a condition defined. Fact of the matter is, this comes down to what's called short circuit logic. In most languages in any if/else pair, once a match with one of the if clauses is established, the rest of the if/else statement is simply ignored - commonly referred to as short circuiting. You'll find that ColdFusion works this way with CFIF, CFELSEIF and CFELSE. However, in the case of IIF(), ColdFusion doesn't short circuit which means that it tries to validate the entire statement block, even though only part of it actually needs to execute. ---[ begin example 1 ]--- cfset strFoo = foo cfif isDefined(strFoo) and len(trim(strFoo)) cfoutputstrFoo = #strFoo#/cfoutput cfelse cfoutputstrFoo2 = #strFoo2#/cfoutput /cfif ---[ end example 1 ]--- ---[ begin example 2 ]--- cfset strFoo = foo cfoutput #iif(isDefined(strFoo) and len(trim(strFoo)),de(strFoo),de(strFoo2))# /cfoutput ---[ end example 2 ]--- Hope that makes sense and/or helps. :) -Tyson -Original Message- From: Brent Goldman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 8:05 PM To: CF-Talk Subject: RE: IIF and DE Hi, Good idea, but I think you missed the problem. There is not two different expressions to evaluate to be TRUE or FALSE as in your example -- just the isDefined function. CF shouldn't be executing the ... blah blah blah ..., but it does, and that is the problem. -Brent -Original Message- From: Tyson Vanek [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 5:57 PM To: CF-Talk Subject: RE: IIF and DE This goes back to the way the old CFIF used to behave. In the past (I think up until CF ver 4.5), the same problem existed with CFIF. Here's an example. Say that the parameter strFoo doesn't exist, consider the following code: cfif isDefined(strFoo) and len(trim(strFoo)) ... blah blah blah ... cfelse ... blah2 blah2 blah2 ... /cfif In the past, ColdFusion would choke on the CFIF statement when strFoo was not defined, even though you'd expect it to immediately jump to the CFELSE statement once the isDefined() returned false. I believe this was fixed with the release of ColdFusion 4.5 - I might be wrong on the version number. My guess is that this behavior is still leftover in the iif() function. I've noticed this in my own development as well that I never seem to be able to use an isDefined() check in an iif() block. Doing so always results in the Error resolving parameter error. A workaround would be to set a default for the variable using CFPARAM and then changing your iif() logic. Here's an example: cfparam name=attributes.order default= cfset orderString = iif(len(trim(attributes.order)),de(amp;order=#attributes.order#),) cflocation url=index.cfm?fuseaction=tools#orderString# Hope this helps, Tyson -Original Message- From: Brent Goldman [mailto:[EMAIL PROTECTED]] Sent
RE: shopping cart / online store
Actually, the argument here goes both ways. On one hand, you could code all your queries into stored procedures. In this manner, database operations typically end up performing faster than they would with inline ColdFusion cfquery statements. However, if you want to port your ColdFusion code to a different RDBMS (i.e. MS SQL Server to Oracle), then you'll likely have to re-write all the stored procedures per Oracle's standards. Additionally, if your ColdFusion developers do not have access to directly modify the stored procedures (sometimes only the DBA will have these rights), then making a change to a database call now involves more people and typically takes longer to complete. On the other hand, you could code all your queries into the ColdFusion code. In this manner, the queries will not run as fast, but any developer with access to change CFML code with also have direct rights to change database calls - eliminating the possible bottleneck mentioned above with getting a DBA involved. However, now if someone wants to port the application to a different language (i.e. ASP, PHP, Perl, whatever) or perhaps build an add-on application that points to the same database, you've now got to re-write all that database business logic in the new language or the new application. That said, as a developer you really have to weigh this against what best suites your needs. Perhaps you're dealing with a low volume site on a hosted server where you don't have rights to create/update stored procedures. In that case, it makes more sense to build your database logic in-line with cfquery statements. However, if you're dealing with a high-traffic site with tons of simultaneous users and have rights to create/update stored procedures (in addition to the knowledge of how to actually write them), you'd probably be best off writing your database logic into stored procedures. Either way, if you shift the RDBMS or the language of the application, you're going to run into some need to change large portions of logic - whether it's in stored procs or it's in ColdFusion code. Just my $0.02, -Tyson -Original Message- From: Dave Feltenberger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 4:44 PM To: CF-Talk Subject: RE: shopping cart / online store The problem with using stored procedures is that if you decide to switch databases, you have to re-write all of them because almost all database vendors use different stored procedure code and structure. By writing the queries in the program itself (included as a query file or in the actual file, whichever), you're not quite as locked into the database - as long as you're using a relational database that supports SQL standards and you write standard SQL, you should be ok to plug and play databases as you please - stored procs screw that all up. Another problem with putting too much business logic in stored procedures is that you put too much strain on the database if the site is hit hard - I worked on a site that gets upwards of a million hits a day (www.casio.com) and using stored procedures to do too much business logic would have bogged down the database servers far too much to make it worthwhile. Instead, we load balanced it all onto several really fast ColdFusion servers and they do the business logic. -Original Message- From: Fuon See Tu [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 5:29 PM To: CF-Talk Subject: RE: shopping cart / online store Coding wise, you better use a real good methodology (gotta do that at all times anyways :P ). Net(fo'got the name) uses fusebox as said on their site. Database wise, you better depend a lot on stored procedures and triggers :) makes things a lot easier and faster. I started working with ASP last week, and passing data back and forth from the DB is a nightmare since I am so used to coldfusion's so very easy query thingamajig. But the ASP project I was updating really relied on stored procedures, and updating it was simple! Although passing variables and such to the stored procedure was still more of a headache than using CF's super dee duper stored procedure param tags =). Stored procedures are your friend! Try to code your site to make the code updated easy. Try not to spaghetti code, and all that stuff they taught u in programming basics. As far as functionality is concerned, think about how cool you want this application to be, then consider if it's worth the time and money. Then think think about how you want the clients to set up a store, and lay out things logically. From: Megan Cytron [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: RE: shopping cart / online store Date: Wed, 29 Aug 2001 16:57:17 -0400 Hello Does anybody know of a good resource for planning, developing, and building an online store front with ColdFusion? Including search capabilities, credit card transactions, etc. Web Monkey has a pretty
RE: IIF and DE
This goes back to the way the old CFIF used to behave. In the past (I think up until CF ver 4.5), the same problem existed with CFIF. Here's an example. Say that the parameter strFoo doesn't exist, consider the following code: cfif isDefined(strFoo) and len(trim(strFoo)) ... blah blah blah ... cfelse ... blah2 blah2 blah2 ... /cfif In the past, ColdFusion would choke on the CFIF statement when strFoo was not defined, even though you'd expect it to immediately jump to the CFELSE statement once the isDefined() returned false. I believe this was fixed with the release of ColdFusion 4.5 - I might be wrong on the version number. My guess is that this behavior is still leftover in the iif() function. I've noticed this in my own development as well that I never seem to be able to use an isDefined() check in an iif() block. Doing so always results in the Error resolving parameter error. A workaround would be to set a default for the variable using CFPARAM and then changing your iif() logic. Here's an example: cfparam name=attributes.order default= cfset orderString = iif(len(trim(attributes.order)),de(amp;order=#attributes.order#),) cflocation url=index.cfm?fuseaction=tools#orderString# Hope this helps, Tyson -Original Message- From: Brent Goldman [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 7:36 PM To: CF-Talk Subject: IIF and DE Hi, I'm trying to use IIF with DE, and it doesn't seem to be working. My code: cfset orderString = iif(isDefined(attributes.order), DE(amp;order=#attributes.order#), ) cflocation url=index.cfm?fuseaction=tools#orderString# What I am trying to do is this: if a certain variable is defined (attributes.order), then create a string that can be appended to a URL, otherwise make the string blank. The desired results: - If attributes.order is set to name, then orderString should be set to amp;order=name - If attributes.order is undefined, then orderString should be set to The problem is that when attributes.order is undefined, ColdFusion still tries to execute the code that should be executed if the first expression was true, thus giving an error. CF is trying to find the value of attributes.order in the DE(amp;order=#attributes.order#) statement, even though attributes.order is undefined, and that statement should go with being evaluated. This problem is kinda hard to explain, but does anyone have any idea on how to fix this??? (without having to use CFIF/CFELSE - the whole point is that I want to use IIF and DE) Thanks -Brent ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Encryption differences in ColdFusion 4.5 and 5.0?
Technicalities aside, I totally agree with your general point here, Ray. Anyone who uses undocumented features of an application, ColdFusion or otherwise, runs the risk of finding themselves in a bind when future revisions and releases are made with the potential of changing or eliminating those features. I preached the same thing about Spectra when people immediately wanted to make changes to the customtags and COAPI. I'm on your side of the fence on this one. This is a fundamental concept of best practices that developers should never ignore. Put simply, the fact that a search on the Allaire ColdFusion Support forums on the keywords encrypt and decrypt returns numerous messages outlining this very same problem indicates that this IS an issue - at least for some developers. However, I'll add that I did some rigorous testing of this issue last night on my system at home under ColdFusion 5.0 and was unable to produce any of the error messages that were claimed under ColdFusion 4.x - perhaps the problem was solved with the release of 5.0? I wrote a script the ran high numbers of loops creating encrypted string, inserting them into a simple database table, retrieving them, decrypting them and displaying them. I was able to do this over 1,000,000 times without causing any errors indicating that The data to be decrypted is invalid. But, I do remember a time in the past on a previous project where we ran into these errors while encrypting strings with ColdFusion 4.x versions. cf_shamelessPlug intImportance=2 As a dedicated veteran ColdFusion developer since July of 1995, a Macromedia Advanced Certified ColdFusion Developer, a BrainBench Master Certified ColdFusion Developer, and a former Senior Consultant in Allaire's Consulting Services division for a year... I would consider myself a ColdFusion expert as well. Plus, I still dabble with Spectra. :) /cf_shamelessPlug -Tyson -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Monday, August 27, 2001 10:09 PM To: CF-Talk Subject: RE: Encryption differences in ColdFusion 4.5 and 5.0? The issue with the out-of-the-box ColdFusion encrypt/decrypt functions is that it doesn't limit itself to safe characters when doing the encrypting. Specifically, there's the possibility that the encrypt() function will generate an encrypted string with single quotes ('), spaces ( ), pound signs But don't you mean unsafe in regards to forms/sql, which is a different subject? I mean, what about my argument that even RepeatString can make a string that isn't safe for forms or sql. Does that make sense? In other words, I don't see it as an issue. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
OT: test (please ignore)
Testing to see if I am able to post to the list. Couldn't last week. Please ignore. -Tyson ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CF Max Memory usage?
That's not adjustable with ColdFusion. You can control how much memory it will allow cached templates to be stored in, but you cannot tune the overall memory footprint of ColdFusion Server. -Tyson -Original Message- From: Jerre Hale [mailto:[EMAIL PROTECTED]] Sent: Monday, August 27, 2001 12:03 PM To: CF-Talk Subject: Re: CF Max Memory usage? Where and how do you make these setting changes that will control the amount memory the CF will use. ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Encryption differences in ColdFusion 4.5 and 5.0?
Ray and all, The issue with the out-of-the-box ColdFusion encrypt/decrypt functions is that it doesn't limit itself to safe characters when doing the encrypting. Specifically, there's the possibility that the encrypt() function will generate an encrypted string with single quotes ('), spaces ( ), pound signs (#), line feeds or line breaks.Once an encrypted string with any of these characters has been generated, it can cause problems when trying to decrypt and get the original string. In some cases, this throws the all-too-familiar The value to be decrypted is not valid error message. Most of the time, this occurs when you take your string, encrypt it, stuff it into the database, retrieve the value from the database and attempt to decrypt it. If the encrypt() function were a little less dangerous, perhaps more people would use it. The headaches caused by this function can also be evidenced by going to the Allaire site and searching the ColdFusion Support Forums for encrypt and decrypt - you'll find tons of messages that describe this very same problem and recommend, as an alternative, to use the undocumented cfusion_encrypt() and cfusion_decrypt() functions. Unfortunately, the release of ColdFusion 5.0 apparently has not corrected this problem either. Hope this helps, Tyson Tyson Vanek, Technical Lead duoDesign, The eBusiness Architects Building your business online 847.491.3000 main | [EMAIL PROTECTED] 847.491.3100 fax | www.duodesign.com 847.491.4270 direct | www.chicagoangels.org Come to our free 2-hour seminar The eBusiness Squeeze http://www.duodesign.com/squeeze/seminar.html -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Monday, August 27, 2001 2:54 PM To: CF-Talk Subject: RE: Encryption differences in ColdFusion 4.5 and 5.0? Errr, this doesn't help you, but why did you use that function instead of the real function, Encrypt? Wasn't it a bit dangerous to use the unofficial function in the first place? I'm not saying you are stupid or anything, and I'm not speaking for MACR, but it does seem like something that should have been a bit obvious... right? Or are many users out there using the unofficial functions? You may be able to simply run a massive cfusion_decrypt on a temporary CF4.5 machine, then restore them using encrypt instead of cfusion_encrypt. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: Dave Feltenberger [mailto:[EMAIL PROTECTED]] Sent: Monday, August 27, 2001 3:49 PM To: CF-Talk Subject: Encryption differences in ColdFusion 4.5 and 5.0? I recently upgraded ColdFusion 4.5.2 to 5.0 on a website I'm using, and now some users can't log in to the site. I'm using the CFusion_Encrypt (string, key) function, and it seems that the encryption is slightly different between the two versions of ColdFusion. The key hasn't changed, and this problem just started when we upgraded to 5.0. Can anyone help me out? Is there a difference in the encryption, or is CF 5's encrypt syntax slightly different? This is urgent, as we have several thousand users in our database that work with 4.5.2 but not with 5.0, and going back to 4.5.2 doesn't look like an option at this point... Thanks. - Dave Feltenberger ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: which web server do you use for CF?
Personally, I've been using Apache on my development environments. It's small, it's quick and it's fast. Certainly not as robust as some of the other web servers out of the box, but it's sufficient for development purposes. -Tyson -Original Message- From: John Quarto-vonTivadar [mailto:[EMAIL PROTECTED]] Sent: Friday, August 24, 2001 10:11 AM To: CF-Talk Subject: which web server do you use for CF? just curious as to which web server folks are using in conjunction with CF *on their laptops/desktops*. (not a production enviroment, just for goofing around). I have Win98 on my laptop and just looking for a small-footprint web server that does more than PWS (heck in PWS I can't even seem to have multiple file names for the default document in each directory!) ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: How can I merge the results of two queries. (tds)
Why not just write a join in your query, like this: tblAuthors ID, Author, ACCNO tblBooks ACCNO, Title SELECT a.ID , a.Author , a.ACCNO , b.Title FROM tblAuthors a , tblBooks b WHERE a.ACCNO = b.ACCNO I think this is what you're looking for. Hope this helps, -Tyson -Original Message- From: Brent Goldman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 8:46 PM To: CF-Talk Subject: RE: How can I merge the results of two queries. (tds) Hi, You can only merge two queries using CF5, because you need to be able to do queries-of-queries, with one of the queries joining the other two queries using SQL. But I guess you can spend hours and hours writing a custom tag that writes its own query using the query functions (QueryNew, QueryAddRow, QueryAddColumn, QuerySetCell) based on two queries that were input into it... -Brent -Original Message- From: Troy Simpson [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 19, 2001 1:09 PM To: CF-Talk Subject: How can I merge the results of two queries. (tds) I have two queries result sets and would like to merge the data together using ColdFusion. What would be an approprate method to accomplish this task? I have ColdFusion Enterprise Edition 4.5.x Here is an example: I have one query result set like so: ID, author, ACCNO 1, Jack, 2 2, Mo, 4 3, Emma, 6 4, Sydney, 8 5, Mary, 11 ... I have another query result set like this: ACCNO, Title 1, The board 2, The walk 3, The sand 4, The beach 5, The ocean 6, The frost 7, The building 8, The house 9, The grass 10, The mud 11, The car ... I want to join these two result sets so that I get a third query result set like this: ACCNO, Title, ID, Author 1, The board, , 2, The walk, 1, Jack 3, The sand, , 4, The beach, 2, Mo 5, The ocean, , 6, The frost, 3, Emma 7, The building, , 8, The house, 4, Sydney 9, The grass, , 10, The mud, , 11, The car, 5, Mary I know that in this example I could use the database to perform an outer join, but the real query sets are not comming from a database. Thanks in advance. Sincerely, Troy -- Troy Simpson | North Carolina State University NCSU Libraries | Campus Box 7111 | Raleigh | North Carolina ph.919.515.3855 | fax.919.513.3330 Some people change when they see the light. Others, when they feel the heat. -- corvis advertisement ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Looping through lists
Chris, I agree with some of the other comments that your database design might need some work, but as an answer to your question I'll propose this. Say your form has a field called FORM.strKeywords which is the field in which the user will type a set of keywords separated by spaces. Here's what you'll want to do on the page that the search form submits to: !--- find all records with matching keywords --- cfquery name=qSearch datasource=yourDSN SELECT id , strName , strKeywords FROM tblYourTableName WHERE 1=1 cfloop list=#trim(form.strKeywords)# index=keyword delimiters= AND strKeywords LIKE '%#keyword#%' /cfloop /cfquery Of course, this will only find records which match ALL of the keywords a user entered. I think you should be able to figure out how to adapt this to finding ANY matching records if that's what you wanted. Hope this helps, Tyson Tyson Vanek, Technical Lead duoDesign, The eBusiness Architects Building your business online 847.491.3000 main | [EMAIL PROTECTED] 847.491.3100 fax | www.duodesign.com 847.491.4270 direct | www.chicagoangels.org Come to our free 2-hour seminar The eBusiness Squeeze http://www.duodesign.com/squeeze/seminar.html -Original Message- From: Chris Geanious [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 11:01 PM To: CF-Talk Subject: Looping through lists Greetings, Am constructing a db search using (among other things) a form text area for keywords. In the data base there is a KeyWords field which contains a comma delimited list of keywords for each entry. I have a query which loops over the form text box entries. How do I then loop over the database keyword fields to check for a match? I am a little stuck. Any suggestions, code snippets, links to sites would be greatly appreciated. TIA, Chris == Chris Geanious Support Systems Analyst Senior Institute For Human Development Northern Arizona University ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: cfhttp Connection failure
The server that the CFHTTP call is running from might not have DNS available. If you're CFHTTP call is pointing to a domain name (i.e. www.amazon.com) rather than an IP address (i.e. 198.24.182.3 - made that up), the server issuing the CFHTTP call has to be correctly configured to use DNS in order to resolve the www.amazon.com into the IP address. Without it, ColdFusion will never make a connection to the page and, if you haven't set a timeout on the CFHTTP call, will permanently jam one of your running request slots in CF. Hope this helps, Tyson Tyson Vanek, Technical Lead duoDesign, The eBusiness Architects Building your business online 847.491.3000 main | [EMAIL PROTECTED] 847.491.3100 fax | www.duodesign.com 847.491.4270 direct | www.chicagoangels.org Come to our free 2-hour seminar The eBusiness Squeeze http://www.duodesign.com/squeeze/seminar.html -Original Message- From: Bud [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 11:14 AM To: CF-Talk Subject: cfhttp Connection failure What could cause this using CFHTTP when I can go to the URL directly in my browser? Thanks, -- Bud Schneehagen - Tropical Web Creations _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ ColdFusion Solutions / eCommerce Development [EMAIL PROTECTED] http://www.twcreations.com/ 954.721.3452 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Open Source Content Mananagent System
It's 98% open source. There are certain files related to security function which are cfencoded. Most of these pertain to security procedures, interactions with LDAP, etc. Other than that, all of the CFML code for Spectra is open source. Additionally, there are also guidelines on how to go about implementing your own changes to Spectra. However, beware of changing Spectra too much if you've paid for a support agreement of the product. Once you start making changes, you'll have a very tough time convincing support to even come near you... and rightly so. -Tyson -Original Message- From: Alex [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 12:19 PM To: CF-Talk Subject: RE: Open Source Content Mananagent System is spectra open source? ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Search Safe String - How-To?
Try using the urlEncodedFormat function. This would convert your string of... news/worldnews.cfm ... into something like this ... news%2Fworldnews%2Ecfm That would do the trick. -Tyson -Original Message- From: David Grabbe [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 2:08 PM To: CF-Talk Subject: RE: Search Safe String - How-To? I understand that in order to make a URL search engine happy it can't contain the '?' or '' charactersall of the solutions I have seen revolve around replacing those with the backslash. I'm running into a problem, though, because the values of my URL variables regularly have a backslash in them already -- to delineate a directory on the web server: http://www.domain.com/home.cfm?page=news/worldnews.cfmlang=en ...and so forth. (Every page is based off the 'home.cfm?page=foo.cfm' template, for ease of including a header, navigation, etc). so the backslash in 'news/worldnews.cfm' is throwing me a curve. I've 'inherited' this site -- not sure if this architecture is a good one or not. Its great because of the template structure, but now that i'm trying to optimize it for search engines, its becoming a pain because of the directory notation. Any suggestions for fixing the URLs for the search engines and/or the underlying structure of the site? TIA, David -Original Message- From: Howie Hamlin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 12:10 PM To: CF-Talk Subject: Re: Search Safe String - How-To? Try this: http://spider-food.net/dynamic-page-optimization.html Regards, Howie Hamlin - inFusion Project Manager On-Line Data Solutions, Inc. www.CoolFusion.com 631-737-4668 x101 inFusion Mail Server (iMS) - The Intelligent Mail Server Join the DevCon community at www.coolfusion.com/devcon - Original Message - From: Joshua Miller [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, August 21, 2001 11:59 AM Subject: Search Safe String - How-To? Where can I find some information on using the Search Safe String methodology (part of Fusebox I believe?) I went to fusebox.org but couldn't find anything specifically detailing how this is done, etc. Thanks! Joshua Miller Web Development::Programming Eagle Technologies Group, Inc. www.eagletgi.com [EMAIL PROTECTED] ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: bug tracking
We use QuickBase here on our projects (http://www.quickbase.com/). Not sure what the costs are, but it seems to generally meet our needs without requiring us to spend time writing our own software to do the job. :) -Tyson -Original Message- From: Kirk Boecker [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 3:47 PM To: CF-Talk Subject: bug tracking do any of you have recommendations for bug/issue tracking? we are currently revamping our QA and testing procedures for all new applications and are looking for software to help manage the bugs/issues thanks kirk ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: CFHTTP inside a huge loop
I smell major kludge here. Is there anything you can do in order to avoid running 1 CFHTTPs? Does this run often? Could you break it into smaller chunks? Could you load information into a database and query it instead? Yikes, Tyson -Original Message- From: J L [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 4:35 PM To: CF-Talk Subject: CFHTTP inside a huge loop Hi all, I have a list of 1+ zip codes. I need to loop over this list and do a CFHTTP post to get the information on each of them. It works fine with 50 zip codes but when it loops over 1 zip codes, it gets stuck and stops executing at the beginning (around the 60th zip code). Please help. Thanks in advance. J ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Character Code....
39 You can also determine this using the following simple code in the future: cfoutput#asc(')#/cfoutput Hope this helps, Tyson -Original Message- From: Kevin Mansel [mailto:[EMAIL PROTECTED]] Sent: Monday, August 20, 2001 2:40 PM To: CF-Talk Subject: Character Code does anyone know the chr() code for the apostrophe? ~ Kevin Mansel Senior Web Developer Fox Communications [EMAIL PROTECTED] DL : 425-649-1321 C : 425-346-7221 ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists