RE: Why i fear ColdFusion is on its last legs
Cold Fusion certainly has its threats, with .Net, PHP, Python etc alternatives out there. Originally CF had the game to itself and it was an original concept that helped ignite enthusiasm and help to turn the web into what it is today. Wait Bryn, you mean the days when CGI people were swearing that coldfusion weren't going anywhere, Flash was just a gleam in Future Splash's pants, And I.E. was Leno and Netscape was Conan? Lol Chung ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329927 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Why i fear ColdFusion is on its last legs
Sorry Dave. Blame it on no caffeine on the account of just waking up to this discussion. Lol weren't going anywhere, Flash was just a gleam in Future Splash's pants, ^^ You really messed up that expression. Just thought I'd point that out. Dave Watts, CTO, Fig Leaf Software ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329946 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Recent SQL Injection attacks
On the SQL injection subject, here's something I add in all my projects. I usually use this snippet of code to intercept at the top level. It helps. cffunction name=isSQLInjection access=public hint=Checks to see if there is a possible SQL Injection attempt cfscript if ( isdefined(cgi.query_string) and ( findnocase(DECLARE,cgi.query_string) or findnocase(CAST(,cgi.query_string) or findnocase(EXEC(,cgi.query_string) or findnocase(EXEC%,cgi.query_string)or len(cgi.query_string) gte 700 ) ) return true; else return false; /cfscript /cffunction -Original Message- From: Al Musella, DPM [mailto:muse...@virtualtrials.com] Sent: Friday, January 15, 2010 2:44 PM To: cf-talk Subject: RE: Recent SQL Injection attacks For coldfusion, I use Fusionreactor.. I look at the request history, and you see the templates that were recently called with the url parameters.. when an attack is in progress, you see a lot of them with big url parameters. Easy to see at a glance. Best part is then you can view the sql queries that ran and how many rows were affected!I can verify that they don't get through to the real database - just the query logging the attempt in my HACK database! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329712 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Methods not found.
Thanks for all the help! I figured it out. Well, not really. I just moved everything around back to what I needed and it just worked. I might have maybe spelled variables wrong or something. LOL So odd. 2009/11/26 Chung Chow cyc...@annex.net Hi all, I'm trying to instantiate an object either in the psuedo-contructor or init of my cfc as a variable so I can use it within all my method inside that cfc. For some reason when I call a method from that object I get a Method not found error. I'm not sure if this is the best way of going about it so if anyone has a better idea, I'd like to hear about it. :) If I istantiate it WITHIN the cffunction, it works fine. Any ideas? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328724 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Methods not found.
Hi all, I'm trying to instantiate an object either in the psuedo-contructor or init of my cfc as a variable so I can use it within all my method inside that cfc. For some reason when I call a method from that object I get a Method not found error. I'm not sure if this is the best way of going about it so if anyone has a better idea, I'd like to hear about it. :) If I istantiate it WITHIN the cffunction, it works fine. Any ideas? Here's a sample of how I'm doing it. When I try to call addErrorMsg(); or isSuccess() or any methods in errorMsg or Imanage or instGateway it throws a Method not found error. cfcomponent displayname=feeds output=false ... cfscript var errorMsg = createObject(component, com.util.errorMessages).init(); var iManager = createObject(component, com.util.imageManager).init(); var instGateway = createObject(component, FeedsGateway).init(application.global); /cfscript cffunction name=init access=public returntype=feeds hint=Constructor cfreturn this /cffunction cffunction name=insertFeedRecord access=public ... cfargument name=dataset required=true type=struct hint=Passed Dataset / cfscript var feedsBean = ; var newFileName = ; var instGatway = ; var results = structNew(); feedsBean = createObject(component, feedsBean).init(argumentCollection=dataset); // Validate the required fields and do an image upload if (not len(trim( feedsBean.getFeedName() ))) errorMsg.addErrorMsg(...Blah); if (not len(trim( feedsBean.getFeedDescription() ))) errorMsg.addErrorMsg(...Blah); if (not len(trim( feedsBean.getAuthorName() ))) errorMsg.addErrorMsg(...Blah); if (errorMsg.isSuccess()) { results.success = instGateway.create(feedsBean, errorMsg); results.errors = errorMsg.getErrors(); } else { results.success = 0; results.errors = errorMsg.getErrors(); } /cfscript cfreturn results / /cffunction /cfcomponent ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328697 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Methods not found.
Gah, sorry. The sample is wrong. The psuedo constructor would look like this and in the cffunction would be called by the variables scope. variables.errorMsg.addErrorMsg() Sorry. was copy/pasting. cfcomponent displayname=feeds output=false ... cfscript variables.errorMsg = createObject(component, com.util.errorMessages).init(); variables.iManager = createObject(component, com.util.imageManager).init(); variables.instGateway = createObject(component, FeedsGateway).init(application.global); /cfscript -Original Message- From: Chung Chow [mailto:cyc...@annex.net] Sent: Wednesday, November 25, 2009 12:37 PM To: cf-talk Subject: Methods not found. Hi all, I'm trying to instantiate an object either in the psuedo-contructor or init of my cfc as a variable so I can use it within all my method inside that cfc. For some reason when I call a method from that object I get a Method not found error. I'm not sure if this is the best way of going about it so if anyone has a better idea, I'd like to hear about it. :) If I istantiate it WITHIN the cffunction, it works fine. Any ideas? Here's a sample of how I'm doing it. When I try to call addErrorMsg(); or isSuccess() or any methods in errorMsg or Imanage or instGateway it throws a Method not found error. cfcomponent displayname=feeds output=false ... cfscript var errorMsg = createObject(component, com.util.errorMessages).init(); var iManager = createObject(component, com.util.imageManager).init(); var instGateway = createObject(component, FeedsGateway).init(application.global); /cfscript cffunction name=init access=public returntype=feeds hint=Constructor cfreturn this /cffunction cffunction name=insertFeedRecord access=public ... cfargument name=dataset required=true type=struct hint=Passed Dataset / cfscript var feedsBean = ; var newFileName = ; var instGatway = ; var results = structNew(); feedsBean = createObject(component, feedsBean).init(argumentCollection=dataset); // Validate the required fields and do an image upload if (not len(trim( feedsBean.getFeedName() ))) errorMsg.addErrorMsg(...Blah); if (not len(trim( feedsBean.getFeedDescription() ))) errorMsg.addErrorMsg(...Blah); if (not len(trim( feedsBean.getAuthorName() ))) errorMsg.addErrorMsg(...Blah); if (errorMsg.isSuccess()) { results.success = instGateway.create(feedsBean, errorMsg); results.errors = errorMsg.getErrors(); } else { results.success = 0; results.errors = errorMsg.getErrors(); } /cfscript cfreturn results / /cffunction /cfcomponent ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328701 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Methods not found.
Yeh Charlie. I sent a following email changing it. lol I was copy pasting the sample out of the cffunctions. lol Thanks. But that doesn't work either. :/ -Original Message- From: Charlie Stell [mailto:charlie.st...@gmail.com] Sent: Wednesday, November 25, 2009 12:54 PM To: cf-talk Subject: Re: Methods not found. I believe you would want : variables.errorMsg = createObject(component, com.util.errorMessages).init(); On Wed, Nov 25, 2009 at 3:36 PM, Chung Chow cyc...@annex.net wrote: Hi all, I'm trying to instantiate an object either in the psuedo-contructor or init of my cfc as a variable so I can use it within all my method inside that cfc. For some reason when I call a method from that object I get a Method not found error. I'm not sure if this is the best way of going about it so if anyone has a better idea, I'd like to hear about it. :) If I istantiate it WITHIN the cffunction, it works fine. Any ideas? Here's a sample of how I'm doing it. When I try to call addErrorMsg(); or isSuccess() or any methods in errorMsg or Imanage or instGateway it throws a Method not found error. cfcomponent displayname=feeds output=false ... cfscript var errorMsg = createObject(component, com.util.errorMessages).init(); var iManager = createObject(component, com.util.imageManager).init(); var instGateway = createObject(component, FeedsGateway).init(application.global); /cfscript cffunction name=init access=public returntype=feeds hint=Constructor cfreturn this /cffunction cffunction name=insertFeedRecord access=public ... cfargument name=dataset required=true type=struct hint=Passed Dataset / cfscript var feedsBean = ; var newFileName = ; var instGatway = ; var results = structNew(); feedsBean = createObject(component, feedsBean).init(argumentCollection=dataset); // Validate the required fields and do an image upload if (not len(trim( feedsBean.getFeedName() ))) errorMsg.addErrorMsg(...Blah); if (not len(trim( feedsBean.getFeedDescription() ))) errorMsg.addErrorMsg(...Blah); if (not len(trim( feedsBean.getAuthorName() ))) errorMsg.addErrorMsg(...Blah); if (errorMsg.isSuccess()) { results.success = instGateway.create(feedsBean, errorMsg); results.errors = errorMsg.getErrors(); } else { results.success = 0; results.errors = errorMsg.getErrors(); } /cfscript cfreturn results / /cffunction /cfcomponent ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328705 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Methods not found.
Yup, checked all that. If I define them as variables. they don't work. Move them into the cffuction area and var them and they work fine. The method are access=public. Constructor returns THIS. I would instantiate them in a application scope but I don't want to do that JUST yet. BTW, what is the drawn back of defining a ton of objects into the application scope? (i.e. making a factory and defining the global used methods in the application.cfc?) Here's the error msg container code: cfcomponent displayname=errorMessages output=false hint=An error Auditor. Grabbing and using an Array cfset variables.instance = arrayNew(1) cffunction name=init access=public returntype=errorMessages hint=Constructor cfreturn this / /cffunction cffunction name=addErrorMsg access=public returntype=any cfargument name=message required=yes default= cfif len(trim(arguments.message)) cfset arrayAppend(variables.instance, arguments.message) / /cfif cfreturn variables.instance / /cffunction cffunction name=isSuccess access=public returntype=boolean cfif arrayLen(variables.instance)cfreturn false / cfelsecfreturn true //cfif /cffunction cffunction name=getErrors access=public returntype=array cfreturn variables.instance / /cffunction /cfcomponent -Original Message- From: Charlie Stell [mailto:charlie.st...@gmail.com] Sent: Wednesday, November 25, 2009 1:03 PM To: cf-talk Subject: Re: Methods not found. Id check the following: That your referring to the CFC in the same way you are defining them. (since you say it works when defining with teh functions, I think this is most likely) The method-access on the other CFCs. That the init function of external CFCs are returning this. You could also instantiate them into the application scope, as long as they are thread-safe, and then refer to them via the application scope. Hope this helps! Gah, sorry. The sample is wrong. The psuedo constructor would look like this and in the cffunction would be called by the variables scope. variables.errorMsg.addErrorMsg() Sorry. was copy/pasting. cfcomponent displayname=feeds output=false ... cfscript variables.errorMsg = createObject(component, com.util.errorMessages).init(); variables.iManager = createObject(component, com.util.imageManager).init(); variables.instGateway = createObject(component, FeedsGateway).init(application.global); /cfscript ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328708 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Methods not found.
Hi Kevin. I've read that whole site a couple of days ago. Good stuff. But apart from making these utilities load in an application scope, I was trying to find a better way accesing them object-wide I guess. I'm worried aboout having to load all these utilities objects in a application variable. Right now it loads the system settings object. How much is too much objects when loading them into an application scope? Sorry for the questions. I just started to revert my programming thinking into an OOP stand point so I'm still sorting through all the damn terminology and concepts. -Original Message- From: Kevan Stannard [mailto:ke...@stannard.net.au] Sent: Wednesday, November 25, 2009 1:56 PM To: cf-talk Subject: Re: Methods not found. I'm not sure if this is the best way of going about it so if anyone has a better idea, I'd like to hear about it. :) You may like to take a look at 'dependecy injection' techniques http://learn.objectorientedcoldfusion.org/wiki/Dependency_Injection 2009/11/26 Chung Chow cyc...@annex.net Hi all, I'm trying to instantiate an object either in the psuedo-contructor or init of my cfc as a variable so I can use it within all my method inside that cfc. For some reason when I call a method from that object I get a Method not found error. I'm not sure if this is the best way of going about it so if anyone has a better idea, I'd like to hear about it. :) If I istantiate it WITHIN the cffunction, it works fine. Any ideas? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328712 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Time add
Just use Date add but using the arguments h,n or s. :) dateadd("h",1,datevar) adds 1 hour dateadd("n",30,datevar) adds 30 minutes Chung QT-Original Message- QTFrom: Eli Shechter [mailto:[EMAIL PROTECTED]] QTSent: Monday, July 31, 2000 7:49 AM QTTo: [EMAIL PROTECTED] QTSubject: Time add QT QT QTIs there a function to do the adding with time. (like DateAdd) QTi want to create a output with the hours of the day by the QThalf hour. QT QTmeaning: QT QT8:00 QT8:30 QT9:00 QT9:30 QT QTdoes anyone know of a way to do this?? QT QTThanx QT-Eli- QT QT QT-- QTArchives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ QTTo Unsubscribe visit QThttp://www.houseoffusion.com/index.cfm?sidebar=listsbody=li QTsts/cf_talk or send a message to QT[EMAIL PROTECTED] with 'unsubscribe' in the body. QT -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.