Re: Deleting a node from XML document
Using betterXml (http://betterxml.riaforge.org/), I would do something like this: cfscript xmlFile = CreateObject('component', 'BetterXML_Editor').init( myXmlFileUrlOrString ); xmlFile.Delete('//element[element_id = courses.specialization2]); xmlFile.Write(myFile); // or something else /cfscript HTH Dominic 2009/7/20 fun and learning funandlrnn...@gmail.com: Hi All, Can anyone please help me on finding out how to delete an element with element id courses.specialization2 in the following XML structure? ?xml version=1.0 encoding=UTF-8 ? error pages page descr=Specialization id=specialization_name elements element element_id specialization.specialization_name /element_id descr Specialization Name: /descr required required field /required /element /elements /page page descr=Courses id=courses_plan elements element element_id courses.specialization1 /element_id descr Specialization1: /descr required required field. /required /element element element_id courses.specialization2 /element_id descr Specialization1: /descr required required field. /required /element /elements /page /pages /error Thanks ~| 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:324748 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Coldfusion 7 and Helm 3
Hi Mike, Many thanks for your reply, great info. I think I'm 99% of the way to getting it all setup. I got the admin API: http://russ.michaels.me.uk/index.cfm/2007/9/29/ColdFusion-Administrator-API- Web-Service and have it configured in Helm. i also set my IPs in the config.cfm and test that the AdminAPIWrapper.cfm can be accessed (ran it from a browser to check the path). However, when I try to add a CF DSN I get Unable to save DSN. Your IP (127.0.0.1) is not allowed! The Helm 3 errors logs show: 2009-07-21 13:03:08 ColdFusionDSN.AddCFDSN 0002: Unable to save DSN. Your IP (127.0.0.1) is not allowed!{0} 2009-07-21 13:03:08 Website.IWeb_Execute 0002: Unable to save DSN. Your IP (127.0.0.1) is not allowed!{0} 2009-07-21 13:03:08 cCFDSN.AddEx 0002: Unable to save DSN. Your IP (127.0.0.1) is not allowed!{0} 2009-07-21 13:03:08 HELM:CCFDSN::Add 0002: Unable to save DSN. Your IP (127.0.0.1) is not allowed!{0} I found a posting about adding the IPs to an ip.cfm file, but I can't see this file anywhere in the CFIDE path. (I even tried creating one and that didn't help.) http://forums.webhostautomation.com/pda/index.php/t-22591.html I can't see anywhere in the CFadmin to add IPs other than the debug and sandbox configs. Any ideas where I'm going wrong please? Also, if you have any further info on how you config'd the sandbox, it would be much appreciated. Thanks, Jenny Gavin-Wear Fast Track Online Tel: 01262 602013 http://www.fasttrackonline.co.uk/ -Original Message- From: Mike Kear [mailto:afpwebwo...@gmail.com] Sent: 17 July 2009 14:59 To: cf-talk Subject: Re: Coldfusion 7 and Helm 3 You can set it up in a variety of ways. We use HELM and CF8 nowdays but we were using HELM and CF7 not so long ago. We have some tags disabled by default, but they can be enabled on request. When we are requested, we set up a sandbox for the user requesting it There are only a couple of functions we will never enable for anyone, and a few mappings that arent available for anyone (e.g. coldspring and Modelglue) but once the clients have their own sandbox, they have a set up very close to their own server (at least in terms of functionality anyway). First read the HELM documentation for how to set it all up. Make sure you have the latest patches for the HELM control panel. The first few months of our using HELM to create coldfusion datasources were error prone - we had to run a function on the database created to fix a cursor error. There was a bug in the HELM-Coldfusion interaction but its fixed now. Broadly, though, the HELM control panel is splendid. There are very few things users want to set up for their sites that arent handled by HELM. I think back 5 or 6 years to the control panel we were using then, and the switch to HELM eliminated nearly all of our support calls, because clients could set up almost anything they wanted themselves, any time they liked. Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month On Fri, Jul 17, 2009 at 10:43 PM, Casey Dougallca...@uberwebsitesolutions.com wrote: On Fri, Jul 17, 2009 at 6:21 AM, Jenny Gavin-Wear jenn...@fasttrackonline.co.uk wrote: Hi all, I'm installing Helm3 with CF7. Is there anything special I need to do to restrict the use of some Coldfusion tags (file and directory, for example) or will Helm take care of that for me? You should look into sandbox... because I'll tell you right off the bat, disabled tags is the one reason why godaddy never worked for my hosting needs. If you can't use cfcreateobject or cfdirectory it's just a pain... BUT I don't understand IF you enable sandbox, select a folder which is the web folder of one of your websites as an example IF something like cfdirectory is allowed beyond that folder. So if you had the main root of your whole IIS folder locked completely. No tags, no nothing... Sanbox locked down 100% no datasources no tags etc. D:\wwwroot Sandbox restricted to this folder.allowing all tags. D:\wwwroot\siteName Does that keep cfdirectory from being able to see below siteName? If that's the case I would go this route. You may need to setup these settings manually when you add new websites by logging into administrator but I believe this is how hosts are doing it. Casey ~| 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:324749 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Help on ColdExt
Justin Carter made it. He was rather helpful when I had some questions a while back. You can go to the project page if you want to contact him http://coldext.riaforge.org/ On Tue, Jul 21, 2009 at 12:42 AM, Arsalan Tariq Keen arsalk...@hotmail.comwrote: h Don... you see the problem is I have zero experience with Javascript and all that's why I found ColdExt so appealing for AJAX based ColdFusion applications :) do you know who wrote ColdExt ... I mean if I could get his/her email id maybe I could consult the very genius :) Regards, Arsalan -- From: Don L do...@yahoo.com Sent: Monday, July 20, 2009 11:30 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Help on ColdExt I may not be the best person to offer you advice on this. But it's been my experience to go directly with Ext itself. Some caveat though. In the Ext world, CSS is critical for many of its classes including Window. It's my understanding, in essence, Ext 2 would use the three parts of: a) CSS b) its js code/class and its methods for control etc. c) to affect which part of DOM (HTML element) Guys... Can any one guide me where I can get help on ColdExt Actually I want to put some text (not form control) inside my FormPanel ... like instructions about filling the form... but I m not able to find a way... can anyone guide me on this one? Regards, Arsalan ~| 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:324750 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
CF app control
Hi, For a cf8 or equivalent app, what options do we have for its control in Windows environment? Here control is meant to be more like setting app trial expiration control, continued use control etc. A cf8 trial edition would revert to developer edition in 30 days, probably the mechanism for that is via registry. Any thoughts would be appreciated. Also, I'm not a traditional programming language guy, so, java or c type is out of my league but would be ok with DOS and the like. Cookie is not really secure and is easily deleted by accident or other events. Your thoughts? Thanks. ~| 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:324751 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Help on ColdExt
When I hit the demo link on riaforge http://www.madfellas.com/docs I get a js error and just a loading widget. Greg On Tue, Jul 21, 2009 at 8:44 AM, Gerald Guido gerald.gu...@gmail.comwrote: Justin Carter made it. He was rather helpful when I had some questions a while back. You can go to the project page if you want to contact him http://coldext.riaforge.org/ On Tue, Jul 21, 2009 at 12:42 AM, Arsalan Tariq Keen arsalk...@hotmail.comwrote: h Don... you see the problem is I have zero experience with Javascript and all that's why I found ColdExt so appealing for AJAX based ColdFusion applications :) do you know who wrote ColdExt ... I mean if I could get his/her email id maybe I could consult the very genius :) Regards, Arsalan -- From: Don L do...@yahoo.com Sent: Monday, July 20, 2009 11:30 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Help on ColdExt I may not be the best person to offer you advice on this. But it's been my experience to go directly with Ext itself. Some caveat though. In the Ext world, CSS is critical for many of its classes including Window. It's my understanding, in essence, Ext 2 would use the three parts of: a) CSS b) its js code/class and its methods for control etc. c) to affect which part of DOM (HTML element) Guys... Can any one guide me where I can get help on ColdExt Actually I want to put some text (not form control) inside my FormPanel ... like instructions about filling the form... but I m not able to find a way... can anyone guide me on this one? Regards, Arsalan ~| 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:324752 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: SSOT: open source software
On Monday 20 Jul 2009, Don L wrote: To me some service contract like delivery of a fix of 8 days is too long. Probably I'll talk to the OSS's owner to negotiate a deal something later Yeah. At a guess if you pay more, you'll get more :-) You know what, I strongly believe, any OSS documentation at a reasonable price, say, $200 or even a bit higher, would sell like hot cake, Aye, documentation is *always* the hardest part of FOSS, because not many geeks have itch over it. to be there already. And I don't think charging too much at initial/beta stage of a product would help it much... Well, look at Google, with 'beta' products for years. It doesn't mean what it used too. -- Helping to efficiently synergize metrics as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.co ~| 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:324753 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CF app control
On Tuesday 21 Jul 2009, Don L wrote: For a cf8 or equivalent app, what options do we have for its control in Windows environment? Something simple like a CFREGIETRY key that stores first start time, and a check that that is not too long ago you mean ? At the end of the day the only thing that will really work is 'phoning home' to your own servers to see if it's allowed to start up. And you can imagine the failure modes of that, and how happy it will leave your customers. -- Helping to paradigmatically deliver turn-key platforms as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.co ~| 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:324754 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Excel2Query
On Friday 17 Jul 2009, John McSwishton wrote: I purchased a CFX from http://www.emerle.net/programming/, CFX_Excel2Query but I keep getting this error: java.lang.ClassNotFoundException: cfx_excel2query.jar, tags folder=classes/ Is this a problem with the CFX or my installation? Where did you put this .jar ? Did you restart CF afterwards ? -- Helping to enthusiastically transition guinine extensible communities as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.co ~| 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:324755 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CF app control
Thank you for your thoughts. On Tuesday 21 Jul 2009, Don L wrote: For a cf8 or equivalent app, what options do we have for its control in Windows environment? Something simple like a CFREGIETRY key that stores first start time, and a check that that is not too long ago you mean ? At the end of the day the only thing that will really work is 'phoning home' to your own servers to see if it's allowed to start up. And you can imagine the failure modes of that, and how happy it will leave your customers. -- Helping to paradigmatically deliver turn-key platforms as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word partner to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells. co ~| 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:324756 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
cferror remove frames
Hello all! I have a custom page for errors and would like to know if it's possible to remove all frames from the page prior to displaying the error page? Currently I have an example where the error is being displayed in the header of a page (with no scrollbars, of course). I'd like to remove all frames prior to displaying the error page so it can be viewed full screen. Thanks! ~| 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:324757 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cferror remove frames
You can't remove the frames without a page referesh, but you should be able to pull them all to zero width/height with JS to give the appearance of a full page. However, I'd generally recommend redirecting to a dedicated error page rather than showing errors inline. If you do that, just throw some frames busting code at the top and you're set. cheers, barneyb -- Barney Boisvert bboisv...@gmail.com http://www.barneyb.com/ On Jul 21, 2009, at 7:00 AM, Mark McArthey wer...@hotmail.com wrote: Hello all! I have a custom page for errors and would like to know if it's possible to remove all frames from the page prior to displaying the error page? Currently I have an example where the error is being displayed in the header of a page (with no scrollbars, of course). I'd like to remove all frames prior to displaying the error page so it can be viewed full screen. Thanks! ~| 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:324758 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Excel2Query
Here is how I did it, using an ad hoc odbc data source (no need for the tag) cffunction name=getExcelSheet access=public output=false returntype=query cfargument name=filename required=true type=string / cfargument name=sheetName required=true type=string / cfscript var c = ; var stmnt = ; var rs = ; var sql = Select * from [#sheetName#$]; var myQuery = ; arguments.filename = expandPath(arguments.filename); if(len(trim(arguments.filename)) and fileExists(arguments.filename)){ CreateObject(java,java.lang.Class).forName(sun.jdbc.odbc.JdbcOdbcDriver); c = CreateObject(java,java.sql.DriverManager).getConnection(jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ= arguments.filename ); stmnt = c.createStatement(); rs = stmnt.executeQuery(sql); myQuery = CreateObject('java','coldfusion.sql.QueryTable').init(rs); rs.close(); c.close(); } return myQuery; /cfscript /cffunction On Fri, Jul 17, 2009 at 12:27 PM, John M Bliss bliss.j...@gmail.com wrote: Not exactly an answer to your question...but: http://cflib.org/udf/parseExcel On Fri, Jul 17, 2009 at 1:18 PM, John McSwishton jmcswish...@gmail.com wrote: I purchased a CFX from http://www.emerle.net/programming/, CFX_Excel2Query but I keep getting this error: java.lang.ClassNotFoundException: cfx_excel2query.jar, tags folder=classes/ Is this a problem with the CFX or my installation? TIA ~| 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:324759 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Deleting a node from XML document
Hi All, Can anyone please help me on finding out how to delete an element with element id courses.specialization2 in the following XML structure? ?xml version=1.0 encoding=UTF-8 ? error pages page descr=Specialization id=specialization_name elements element element_id specialization.specialization_name /element_id descr Specialization Name: /descr required required field /required /element /elements /page page descr=Courses id=courses_plan elements element element_id courses.specialization1 /element_id descr Specialization1: /descr required required field. /required /element element element_id courses.specialization2 /element_id descr Specialization1: /descr required required field. /required /element /elements /page /pages /error Thanks You can also use XSLT to get this done as well. Here is a link to another board that gives a pretty good explanation of how to remove nodes from an XML document: http://bytes.com/groups/xml/638356-xsl-how-remove-nodes-xml-tree-advanced --JW ~| 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:324760 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: extract youtube video id from embed script
The following code makes a couple of assumptions about the URL / id which are probably safe, but not guaranteed (that the ID will always be before an ampersand, and never contain any slashes). cfsavecontent variable=Codeobject width=550 height=331param name=movie value=http://www.youtube.com/v/iNCsMTYkw1Mhl=enfs=1;/paramparam name=allowFullScreen value=true/paramparam name=allowscriptaccess value=always/paramembed src=http://www.youtube.com/v/iNCsMTYkw1Mhl=enfs=1; type=application/x-shockwave-flash allowscriptaccess=always allowfullscreen=true width=550 height=331/embed/object/cfsavecontent !--- INFO: Since CF doesn't have a HtmlParse we need to escape ampersands for XML: --- cfset Code = replace(Code,'','amp;','all')/ !--- INFO: Convert Code to XML nodeset and locate src of embed tag. --- cfset XmlData = XmlParse(Code) / cfset EmbedSrc = XmlSearch(XmlData,'//embed/@src') / cfset VideoUrl = EmbedSrc[1].XmlValue / !--- INFO: Locate Id by stripping away everything after the first and everything before the last / --- cfset VideoId = ListLast(ListFirst(VideoUrl,''),'/')/ ~| 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:324761 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Handling POST requests
Hi All, Does anyone know if there is a way to begin handling a POST request on the CF server before all of the POST data has actually been received? That way, in the case of file uploads, it would be possible to get the Content-Length and the location of the temporary upload file before the upload is complete. Thanks! ~| 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:324762 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: extract youtube video id from embed script
It looks like the HoF display code is broken. This line of code: cfset Code = replace(Code,'','','all')/ Should have ' a m p ;' (without spaces) as the third argument. ~| 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:324763 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: SSOT: open source software
not suggesting not to make the switch but think twice or better talk to the key person of the product you intend to switch to and possibly strike a deal or at least obtain his/her support first otherwise your conversion/switch would be at the mercy of others. Anyone switching vendors should always think carefully about all aspects of the transition. I would expect people to run a test server and see how the software behaved and, if there are issues, raise them politely on the appropriate list and perhaps create issues in the vendor's bug tracker (since all three CFML vendors have open public bug trackers now). Some people have very reasonable expectations of compatibility and response times. Others do not. Some people understand the commercial value of a support agreement, others see no need to buy maintenance and support (and then some of those folks bitch loudly when issues don't get addressed immediately for free!). There are pros and cons - trade offs - in any technology choice... ~| 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:324764 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Handling POST requests
There is not, at least with CF. It does it's file upload processing as part of the entrance chain to the main request handling, so the file must be complete before the core request body can be entered. That said, you should be able to write a servlet filter that does offloading and just provides sufficient data to CF to allow those bits to proceed. We use ColdFusion within Magnolia (a Java CMS) and had to do this because both Magnolia and ColdFusion want to deal with file uploads. We let Magnolia handle them, and then spoof the data structures needed to let ColdFusion skip the actual upload process and just piggyback on what Magnolia does. We didn't do any sort of partial upload stuff as you describe, but you should be able to synthesize the data structures in the same way so you can hand off to ColdFusion before all the bytes are read. You'll obviously need some way to tell CF that the upload is complete, and probably a way to let CF wait for that to happen, but that's a different set of problems (multithreading! yay!). cheers, barneyb On Tue, Jul 21, 2009 at 10:24 AM, Andrew Aand...@globalreach.com wrote: Hi All, Does anyone know if there is a way to begin handling a POST request on the CF server before all of the POST data has actually been received? That way, in the case of file uploads, it would be possible to get the Content-Length and the location of the temporary upload file before the upload is complete. Thanks! ~| 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:324765 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Function Encapsulation Gone Too Far? - Opinions
The code below contains a couple functions that determine if HTTPS is on and if the server_name is the same as the full domain name. On our internal network, we don't need to specify the full domain name. In other words, we can just use mywebsite rather than mywebsite.evansville.edu. However, I want to redirect the browser to the full domain name as well as turn HTTPS on if it is off. I'm trying to follow best practices where my functions do not assume to know anything. This is why I'm passing in the CGI scope variables rather than coding them directly in the functions. Is this correct or am I just making the code too hard to read? Would it be bad form to use the getFullHostName function directly inside the redirectBrowser function? -- cfcomponent output=no cfset redirectBrowser(getFullHostName(cgi.server_name), cgi.server_name, cgi.https) cffunction name=getFullHostName access=private returntype=string output=no cfargument name=hostName type=string required=yes cfreturn listFirst(arguments.hostName, .) .evansville.edu /cffunction cffunction name=redirectBrowser access=private returntype=void output=no cfargument name=fullHostName type=string required=yes cfargument name=serverName type=string required=yes cfargument name=https type=string required=yes cfif not findNoCase(arguments.fullHostName, arguments.serverName) or not findNoCase(arguments.https, on) cflocation url=https://#arguments.fullHostName#/ https://#arguments.fullHostName#/ addtoken=no statuscode=301 /cfif /cffunction /cfcomponent Michael Dawson Manager of Web Applications Office of Technology Services University of Evansville Each time you send an email message with a background pattern or loud background color, an endangered tree dies. Please help us save a tree. Just say NO to email backgrounds. ~| 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:324766 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
CFMX7, Ubuntu, Virtual Hosts, and a weird CFLOCK issue
Background: I have a local CFMX7 development server running on Ubuntu 8.0.4 and Apache 2.2. For most of my sites I have a domain name that is specific to that server, and sites that run off of subdirectories (ex: http://www.devbox.com/CFAPPS/sitename/) without a problem. Today I was having to set up a site to use a vanity domain name (http://www.mydomain.com) which points to a subdirectory of /www/CFAPPS/ on my server (like the other sites that work do), and I added a virtual host to Apache. It seems to have set up fine there, but I get a weird error when I try to access the site: == Cannot lock SESSION scope. CFLock cannot be used to lock the application or session shared scopes without these scopes being established through the use of the CFApplication tag. If you want to use the session scope you need to enable session management. Application and/or Session variables must also be enabled in the ColdFusion Administrator. The error occurred in /var/www/CFAPPS/[site name removed for privacy]/Application.cfc: line 278 276 : cfelse 277 : !--- delete the session variable for old errors --- 278 : cflock timeout=10 throwontimeout=No type=EXCLUSIVE scope=SESSION 279 : cfset structdelete(session,error) / 280 : /cflock == The Application.cfc file has things set up properly: == cfset this.name = [site name removed for privacy] / cfset this.applicationTimeout = createTimeSpan(0,1,0,0) / cfset this.clientManagement = false / cfset this.sessionManagement = true / cfset this.sessionTimeout = createTimeSpan(0,0,30,0) / cfset this.setClientCookies = false / cfset this.setDomainCookies = false / cfset this.scriptProtect = all / == And I checked the CFAdmin settings and it's fine, J2EE session variables, Enable Application variables, and Enable session variables are all checked. I also know this because the other sites that don't use a vanity domain name are working fine. I have no idea at this point why this might be erroring. Anyone have 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:324767 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Function Encapsulation Gone Too Far? - Opinions
It's hard to say if you're really overdoing it. In one sense, the component is pretty well encapsulated. Accessing the cgi scope just in the constructor is fair enough, though for the true purists, you could move that out, and for the OO realists, you could just put cgi references anywhere. Also the use of the constructor, while not a no-no, is usually overlooked in support of an init method. I know I always look first for an init method well before looking for constructor code. Still, it's perfectly fine. If you think this is an area of your app that will change, then by all means, encapsulate it, give it its own object etc. However... It's like 3 lines of code you could drop in your onRequestStart method. You'd eliminate an entire object creation, 2 cffunctions, 20+ lines of code: cfif cgi.server_name neq listFirst(arguments.hostName, .) . evansville.edu or cgi.https neq on cflocation https://; listFirst(arguments.hostName, .) . evansville.edu/ / /cfif But if you are going to need to overwrite that functionality in certain cases or add complexity later on, you might as well separate it out at least a little. nathan strutz [Blog and Family @ http://www.dopefly.com/] [AZCFUG Manager @ http://www.azcfug.org/] [Twitter @nathanstrutz] On Tue, Jul 21, 2009 at 12:01 PM, Dawson, Michael m...@evansville.eduwrote: The code below contains a couple functions that determine if HTTPS is on and if the server_name is the same as the full domain name. On our internal network, we don't need to specify the full domain name. In other words, we can just use mywebsite rather than mywebsite.evansville.edu. However, I want to redirect the browser to the full domain name as well as turn HTTPS on if it is off. I'm trying to follow best practices where my functions do not assume to know anything. This is why I'm passing in the CGI scope variables rather than coding them directly in the functions. Is this correct or am I just making the code too hard to read? Would it be bad form to use the getFullHostName function directly inside the redirectBrowser function? -- cfcomponent output=no cfset redirectBrowser(getFullHostName(cgi.server_name), cgi.server_name, cgi.https) cffunction name=getFullHostName access=private returntype=string output=no cfargument name=hostName type=string required=yes cfreturn listFirst(arguments.hostName, .) .evansville.edu /cffunction cffunction name=redirectBrowser access=private returntype=void output=no cfargument name=fullHostName type=string required=yes cfargument name=serverName type=string required=yes cfargument name=https type=string required=yes cfif not findNoCase(arguments.fullHostName, arguments.serverName) or not findNoCase(arguments.https, on) cflocation url=https://#arguments.fullHostName#/ https://#arguments.fullHostName#/ addtoken=no statuscode=301 /cfif /cffunction /cfcomponent Michael Dawson Manager of Web Applications Office of Technology Services University of Evansville Each time you send an email message with a background pattern or loud background color, an endangered tree dies. Please help us save a tree. Just say NO to email backgrounds. ~| 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:324768 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFMX7, Ubuntu, Virtual Hosts, and a weird CFLOCK issue
I should add that this code works fine on the team's dev server. ~| 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:324769 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Caching issue
Setup.. 18 web servers with Windows 2003/CF7 or 2008/CF8. It appears that I am pulling up cached queries from the servers. If I pull up a movie list from a customer, I get a different customer. If I refresh the list, then the right list shows up. If I clear my cookies/cache, close the browser and try again with a different customer list.. same thing. I get the wrong list, but when I refresh I get the right list. No changes to the scripts and this starting happening over night. None of the servers have saved cached queries and all the queries in the coding are not cached. If I try to debug, I get no debugging info (with the wrong list). But if I refresh, I then get debugging info with the right list. I have added the following on top of the application.cfm template: cfheader name=expires value=#now()# cfheader name=pragma value=no-cache cfheader name=cache-control value=no-cache, no-store, must-revalidate But that still does not appear to fix the issue. Any other ideas what to look for? Thanks Jacob ~| 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:324770 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Function Encapsulation Gone Too Far? - Opinions
Nathan, thanks for the reply. I should have mentioned that this is the Application.cfc that I'm buildling. That is why I'm using the CGI scope in the constructor. This is sort of a follow-up to a post I had a few weeks ago. This code will be placed in the constructor of the Application.cfc to redirect a browser to a secured connection. It was determined that the most-logical place was the constructor just so no Application.cfc methods would have to fire before the redirect took place. I am fine with that logic. However, it seems like I am making my code too-complex for this simple task of redirecting a browser. On the other hand, I would still like to adhere to best practices. After looking at my code, again, I noticed that my redirectBrowser is doing two things: Determining if the browser should be redirected and then doing the actual redirect. If I were to refactor this code, I should have a method to determine if the browser should be redirected, then, if so, call the redirectBrowser method. But, then I think that I'm making it too complex for the deed. Thanks, Mike -Original Message- From: Nathan Strutz [mailto:str...@gmail.com] Sent: Tuesday, July 21, 2009 2:38 PM To: cf-talk Subject: Re: Function Encapsulation Gone Too Far? - Opinions It's hard to say if you're really overdoing it. In one sense, the component is pretty well encapsulated. Accessing the cgi scope just in the constructor is fair enough, though for the true purists, you could move that out, and for the OO realists, you could just put cgi references anywhere. Also the use of the constructor, while not a no-no, is usually overlooked in support of an init method. I know I always look first for an init method well before looking for constructor code. Still, it's perfectly fine. If you think this is an area of your app that will change, then by all means, encapsulate it, give it its own object etc. However... It's like 3 lines of code you could drop in your onRequestStart method. You'd eliminate an entire object creation, 2 cffunctions, 20+ lines of code: cfif cgi.server_name neq listFirst(arguments.hostName, .) . evansville.edu or cgi.https neq on cflocation https://; listFirst(arguments.hostName, .) . evansville.edu/ / /cfif But if you are going to need to overwrite that functionality in certain cases or add complexity later on, you might as well separate it out at least a little. nathan strutz [Blog and Family @ http://www.dopefly.com/] [AZCFUG Manager @ http://www.azcfug.org/] [Twitter @nathanstrutz] ~| 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:324771 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Caching issue
Are you using CFCs in a shared scope, like the application scope? It could be coming from badly scoped vars inside them. This is a fairly complex problem you are asking about, providing some code samples from the offending areas would be helpful. Also, the context to which the code samples are used (ex, This query is inside a CFC that is instantiated into the application scope...) =] -- Alan Rother Adobe Certified Advanced ColdFusion MX 7 Developer Manager, Phoenix Cold Fusion User Group, AZCFUG.org ~| 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:324772 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
using CF to eliminate old Real Estate photos
I program and host for about 15 Real Estate Agent/Brokers in our area using a server with CF5 installed.. The company that provides server management for our local Realtor's association sends a zipped file of modified photos to my server each night. The file contains new listings and updated photos for existing listings but does not address the problem of accumulating expired or sold listings. Even if I set the directory capacity to 3 GB, sooner or later the directory will fill up. Therefore, I have to come up with a scheme to remove the out-of-date photos to avoid reaching the directory's maximum allowed space. So far, I have succeeded in creating a complete list of current MLS numbers from the multiple tables this provider uses (query name: GetAll) and a complete list of files contained in the images directory (using CFDIRECTORY name = Photos.) Both of these queries produce exactly the data I expect. However, I believe the hitch in my get-along comes from the file naming convention used by the provider. They allow 12 photos per listing and name each of photo by adding a letter to the end of the MLS number, so that photos for MLS # 9 are named 9a, 9b, and so on. Well, I thought I had it figured out. I tried to create a list of unmatched files using this query: CFQUERY name=GetUnmatched dataSource=#DSN# SELECT Name FROM Photos WHERE %Name% NOT IN (cfqueryparam value=#valueList(GetAll.MLS_Number)# cfsqltype=cf_sql_integer list=true) ORDER BY Name /CFQUERY and then use a CFFILE tag to delete the records found in the unmatched list. However, I get an error when I run it. You can give it a try at http://www.newnorthrealestate.com/GetMLSnew.cfm ( It takes a while to generate the lists and you'll have to scroll way down to see the error message) Question: Can the wildcard % be used they way I have them in the GetUnmatched query? Is there a correct method for parsing the file names in the photo directory and then doing the comparison? Am I on the right track at all? Thanks for taking a look at this. Dave -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ~| 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:324773 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFMX7, Ubuntu, Virtual Hosts, and a weird CFLOCK issue
Perhaps with the direct domain name, you remove the ability to traverse up the directory tree to get at the application.cfc? Is the application.cfc in the same directory as the page you are calling? Background: I have a local CFMX7 development server running on Ubuntu 8.0.4 and Apache 2.2. For most of my sites I have a domain name that is specific to that server, and sites that run off of subdirectories (ex: http://www.devbox.com/CFAPPS/sitename/) without a problem. Today I was having to set up a site to use a vanity domain name (http://www.mydomain.com) which points to a subdirectory of /www/CFAPPS/ on my server (like the other sites that work do), and I added a virtual host to Apache. It seems to have set up fine there, but I get a weird error when I try to access the site: == Cannot lock SESSION scope. CFLock cannot be used to lock the application or session shared scopes without these scopes being established through the use of the CFApplication tag. If you want to use the session scope you need to enable session management. Application and/or Session variables must also be enabled in the ColdFusion Administrator. The error occurred in /var/www/CFAPPS/[site name removed for privacy]/Application.cfc: line 278 276 : cfelse 277 : !--- delete the session variable for old errors --- 278 : cflock timeout=10 throwontimeout=No type=EXCLUSIVE scope=SESSION 279 : cfset structdelete(session,error) / 280 : /cflock == The Application.cfc file has things set up properly: == cfset this.name = [site name removed for privacy] / cfset this.applicationTimeout = createTimeSpan(0,1,0,0) / cfset this.clientManagement = false / cfset this.sessionManagement = true / cfset this.sessionTimeout = createTimeSpan(0,0,30,0) / cfset this.setClientCookies = false / cfset this.setDomainCookies = false / cfset this.scriptProtect = all / == And I checked the CFAdmin settings and it's fine, J2EE session variables, Enable Application variables, and Enable session variables are all checked. I also know this because the other sites that don't use a vanity domain name are working fine. I have no idea at this point why this might be erroring. Anyone have 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:324774 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Caching issue
Are you using session scope for anything (like the current customer)? If so, do you have a load balancer that may have lost its sticky IP setting? (It could be that you are bouncing around your web site cluster and getting different session state on each one.) Thanks Mark -Original Message- From: Jacob [mailto:ja...@excaliburfilms.com] Sent: Tuesday, July 21, 2009 3:49 PM To: cf-talk Subject: Caching issue Setup.. 18 web servers with Windows 2003/CF7 or 2008/CF8. It appears that I am pulling up cached queries from the servers. If I pull up a movie list from a customer, I get a different customer. If I refresh the list, then the right list shows up. If I clear my cookies/cache, close the browser and try again with a different customer list.. same thing. I get the wrong list, but when I refresh I get the right list. No changes to the scripts and this starting happening over night. None of the servers have saved cached queries and all the queries in the coding are not cached. If I try to debug, I get no debugging info (with the wrong list). But if I refresh, I then get debugging info with the right list. I have added the following on top of the application.cfm template: cfheader name=expires value=#now()# cfheader name=pragma value=no-cache cfheader name=cache-control value=no-cache, no-store, must-revalidate But that still does not appear to fix the issue. Any other ideas what to look for? Thanks Jacob ~| 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:324775 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Function Encapsulation Gone Too Far? - Opinions
Mike, I can get behind one method that determines if it needs redirection and another that does the redirecting. Actually, because it's simply 1 if statement, I don't oppose putting it all together in the same method. Think about this procedure changing in the future. Again, that's what it all comes down to. If you are going to change the if-check to see if it needs redirection, you're very likely to change the location you redirect to - IMO, they are related too closely to separate. Also remember that less is less. Fewer methods means less complication, fewer lines to maintain, faster code navigation, faster developer ramp-up speed. (reference: http://gettingreal.37signals.com/toc.php) nathan strutz [Blog and Family @ http://www.dopefly.com/] [AZCFUG Manager @ http://www.azcfug.org/] [Twitter @nathanstrutz] On Tue, Jul 21, 2009 at 12:50 PM, Dawson, Michael m...@evansville.eduwrote: Nathan, thanks for the reply. I should have mentioned that this is the Application.cfc that I'm buildling. That is why I'm using the CGI scope in the constructor. This is sort of a follow-up to a post I had a few weeks ago. This code will be placed in the constructor of the Application.cfc to redirect a browser to a secured connection. It was determined that the most-logical place was the constructor just so no Application.cfc methods would have to fire before the redirect took place. I am fine with that logic. However, it seems like I am making my code too-complex for this simple task of redirecting a browser. On the other hand, I would still like to adhere to best practices. After looking at my code, again, I noticed that my redirectBrowser is doing two things: Determining if the browser should be redirected and then doing the actual redirect. If I were to refactor this code, I should have a method to determine if the browser should be redirected, then, if so, call the redirectBrowser method. But, then I think that I'm making it too complex for the deed. Thanks, Mike -Original Message- From: Nathan Strutz [mailto:str...@gmail.com] Sent: Tuesday, July 21, 2009 2:38 PM To: cf-talk Subject: Re: Function Encapsulation Gone Too Far? - Opinions It's hard to say if you're really overdoing it. In one sense, the component is pretty well encapsulated. Accessing the cgi scope just in the constructor is fair enough, though for the true purists, you could move that out, and for the OO realists, you could just put cgi references anywhere. Also the use of the constructor, while not a no-no, is usually overlooked in support of an init method. I know I always look first for an init method well before looking for constructor code. Still, it's perfectly fine. If you think this is an area of your app that will change, then by all means, encapsulate it, give it its own object etc. However... It's like 3 lines of code you could drop in your onRequestStart method. You'd eliminate an entire object creation, 2 cffunctions, 20+ lines of code: cfif cgi.server_name neq listFirst(arguments.hostName, .) . evansville.edu or cgi.https neq on cflocation https://; listFirst(arguments.hostName, .) . evansville.edu/ / /cfif But if you are going to need to overwrite that functionality in certain cases or add complexity later on, you might as well separate it out at least a little. nathan strutz [Blog and Family @ http://www.dopefly.com/] [AZCFUG Manager @ http://www.azcfug.org/] [Twitter @nathanstrutz] ~| 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:324776 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Function Encapsulation Gone Too Far? - Opinions
Thanks for the advice and the link. That is a very interesting book. Thanks, Mike -Original Message- From: Nathan Strutz [mailto:str...@gmail.com] Sent: Tuesday, July 21, 2009 3:08 PM To: cf-talk Subject: Re: Function Encapsulation Gone Too Far? - Opinions Mike, I can get behind one method that determines if it needs redirection and another that does the redirecting. Actually, because it's simply 1 if statement, I don't oppose putting it all together in the same method. Think about this procedure changing in the future. Again, that's what it all comes down to. If you are going to change the if-check to see if it needs redirection, you're very likely to change the location you redirect to - IMO, they are related too closely to separate. Also remember that less is less. Fewer methods means less complication, fewer lines to maintain, faster code navigation, faster developer ramp-up speed. (reference: http://gettingreal.37signals.com/toc.php) nathan strutz [Blog and Family @ http://www.dopefly.com/] [AZCFUG Manager @ http://www.azcfug.org/] [Twitter @nathanstrutz] On Tue, Jul 21, 2009 at 12:50 PM, Dawson, Michael m...@evansville.eduwrote: Nathan, thanks for the reply. I should have mentioned that this is the Application.cfc that I'm buildling. That is why I'm using the CGI scope in the constructor. This is sort of a follow-up to a post I had a few weeks ago. This code will be placed in the constructor of the Application.cfc to redirect a browser to a secured connection. It was determined that the most-logical place was the constructor just so no Application.cfc methods would have to fire before the redirect took place. I am fine with that logic. However, it seems like I am making my code too-complex for this simple task of redirecting a browser. On the other hand, I would still like to adhere to best practices. After looking at my code, again, I noticed that my redirectBrowser is doing two things: Determining if the browser should be redirected and then doing the actual redirect. If I were to refactor this code, I should have a method to determine if the browser should be redirected, then, if so, call the redirectBrowser method. But, then I think that I'm making it too complex for the deed. Thanks, Mike -Original Message- From: Nathan Strutz [mailto:str...@gmail.com] Sent: Tuesday, July 21, 2009 2:38 PM To: cf-talk Subject: Re: Function Encapsulation Gone Too Far? - Opinions It's hard to say if you're really overdoing it. In one sense, the component is pretty well encapsulated. Accessing the cgi scope just in the constructor is fair enough, though for the true purists, you could move that out, and for the OO realists, you could just put cgi references anywhere. Also the use of the constructor, while not a no-no, is usually overlooked in support of an init method. I know I always look first for an init method well before looking for constructor code. Still, it's perfectly fine. If you think this is an area of your app that will change, then by all means, encapsulate it, give it its own object etc. However... It's like 3 lines of code you could drop in your onRequestStart method. You'd eliminate an entire object creation, 2 cffunctions, 20+ lines of code: cfif cgi.server_name neq listFirst(arguments.hostName, .) . evansville.edu or cgi.https neq on cflocation https://; listFirst(arguments.hostName, .) . evansville.edu/ / /cfif But if you are going to need to overwrite that functionality in certain cases or add complexity later on, you might as well separate it out at least a little. nathan strutz [Blog and Family @ http://www.dopefly.com/] [AZCFUG Manager @ http://www.azcfug.org/] [Twitter @nathanstrutz] ~| 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:324777 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFMX7, Ubuntu, Virtual Hosts, and a weird CFLOCK issue
Perhaps with the direct domain name, you remove the ability to traverse up the directory tree to get at the application.cfc? Is the application.cfc in the same directory as the page you are calling? Yes it is. As I said before, this exact setup works properly on another server (only that is a Solaris box, not Ubuntu). Because of that, I am thinking that it has to be in how I set up the virtual host somehow, or maybe it's because it's on Ubuntu (which was not supported for CFMX7)? I am by no means a Unix guru, I followed a blog post to get the virtual site set up. The error is in onError(), I'd like to see the root error that caused this (assuming there is one here). Mayeb that will give some insight. Just an odd thing to have session management set up but have it act like it's not? ~| 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:324778 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CFMX7, Ubuntu, Virtual Hosts, and a weird CFLOCK issue
Perhaps with the direct domain name, you remove the ability to traverse up the directory tree to get at the application.cfc? Is the application.cfc in the same directory as the page you are calling? Al, you are the man. I set up the site directory name wrong compared to the working server. The first letter should have been capitalized. That little fix there (and in the virtual hosts setup) fixed everything. Thank you for making me step back through the setup with your suggestion! ~| 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:324779 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: using CF to eliminate old Real Estate photos
Without being able to test it since I use MySQL instead of SQL server, I think the problem is the use of %Name% in that manner. You might try taking your MLS number query, GetAll, and loop or output that over a second query, deleting the photo if its name isn't found. cfoutput query = GetAll cfquery name = selectMatchingImage datasource=#dsn# selectname from photos where left(name, 5) = '#GetAll.mlsNumber#' /cfquery cfif selectMatchingImage.recordCount eq 0 cffile action = delete file = #expandPath('/photos/#selectMatchingImage.name#')# /cfif /cfoutput That works with MySQL 5. You'd need an equivalent for SQL Server for the left(name, 5) if that doesn't work. This also assumes that the MLS numbers are always the first 5 digits, and not more or less. Hope this helps somehow... Rick -Original Message- From: Dave Long [mailto:d...@northgoods.com] Sent: Tuesday, July 21, 2009 4:06 PM To: cf-talk Subject: using CF to eliminate old Real Estate photos I program and host for about 15 Real Estate Agent/Brokers in our area using a server with CF5 installed.. The company that provides server management for our local Realtor's association sends a zipped file of modified photos to my server each night. The file contains new listings and updated photos for existing listings but does not address the problem of accumulating expired or sold listings. Even if I set the directory capacity to 3 GB, sooner or later the directory will fill up. Therefore, I have to come up with a scheme to remove the out-of-date photos to avoid reaching the directory's maximum allowed space. So far, I have succeeded in creating a complete list of current MLS numbers from the multiple tables this provider uses (query name: GetAll) and a complete list of files contained in the images directory (using CFDIRECTORY name = Photos.) Both of these queries produce exactly the data I expect. However, I believe the hitch in my get-along comes from the file naming convention used by the provider. They allow 12 photos per listing and name each of photo by adding a letter to the end of the MLS number, so that photos for MLS # 9 are named 9a, 9b, and so on. Well, I thought I had it figured out. I tried to create a list of unmatched files using this query: CFQUERY name=GetUnmatched dataSource=#DSN# SELECT Name FROM Photos WHERE %Name% NOT IN (cfqueryparam value=#valueList(GetAll.MLS_Number)# cfsqltype=cf_sql_integer list=true) ORDER BY Name /CFQUERY and then use a CFFILE tag to delete the records found in the unmatched list. However, I get an error when I run it. You can give it a try at http://www.newnorthrealestate.com/GetMLSnew.cfm ( It takes a while to generate the lists and you'll have to scroll way down to see the error message) Question: Can the wildcard % be used they way I have them in the GetUnmatched query? Is there a correct method for parsing the file names in the photo directory and then doing the comparison? Am I on the right track at all? Thanks for taking a look at this. Dave -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ~| 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:324780 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: using CF to eliminate old Real Estate photos
Well...the query needs to be modified... cfquery name = selectMatchingImage dbtype=query selectname from photos where left(name, 5) = '#GetAll.mlsNumber#' /cfquery I think that will work with the rest of it. hth, Rick -Original Message- From: Rick Faircloth [mailto:r...@whitestonemedia.com] Sent: Tuesday, July 21, 2009 5:24 PM To: cf-talk Subject: RE: using CF to eliminate old Real Estate photos Without being able to test it since I use MySQL instead of SQL server, I think the problem is the use of %Name% in that manner. You might try taking your MLS number query, GetAll, and loop or output that over a second query, deleting the photo if its name isn't found. cfoutput query = GetAll cfquery name = selectMatchingImage datasource=#dsn# selectname from photos where left(name, 5) = '#GetAll.mlsNumber#' /cfquery cfif selectMatchingImage.recordCount eq 0 cffile action = delete file = #expandPath('/photos/#selectMatchingImage.name#')# /cfif /cfoutput That works with MySQL 5. You'd need an equivalent for SQL Server for the left(name, 5) if that doesn't work. This also assumes that the MLS numbers are always the first 5 digits, and not more or less. Hope this helps somehow... Rick -Original Message- From: Dave Long [mailto:d...@northgoods.com] Sent: Tuesday, July 21, 2009 4:06 PM To: cf-talk Subject: using CF to eliminate old Real Estate photos I program and host for about 15 Real Estate Agent/Brokers in our area using a server with CF5 installed.. The company that provides server management for our local Realtor's association sends a zipped file of modified photos to my server each night. The file contains new listings and updated photos for existing listings but does not address the problem of accumulating expired or sold listings. Even if I set the directory capacity to 3 GB, sooner or later the directory will fill up. Therefore, I have to come up with a scheme to remove the out-of-date photos to avoid reaching the directory's maximum allowed space. So far, I have succeeded in creating a complete list of current MLS numbers from the multiple tables this provider uses (query name: GetAll) and a complete list of files contained in the images directory (using CFDIRECTORY name = Photos.) Both of these queries produce exactly the data I expect. However, I believe the hitch in my get-along comes from the file naming convention used by the provider. They allow 12 photos per listing and name each of photo by adding a letter to the end of the MLS number, so that photos for MLS # 9 are named 9a, 9b, and so on. Well, I thought I had it figured out. I tried to create a list of unmatched files using this query: CFQUERY name=GetUnmatched dataSource=#DSN# SELECT Name FROM Photos WHERE %Name% NOT IN (cfqueryparam value=#valueList(GetAll.MLS_Number)# cfsqltype=cf_sql_integer list=true) ORDER BY Name /CFQUERY and then use a CFFILE tag to delete the records found in the unmatched list. However, I get an error when I run it. You can give it a try at http://www.newnorthrealestate.com/GetMLSnew.cfm ( It takes a while to generate the lists and you'll have to scroll way down to see the error message) Question: Can the wildcard % be used they way I have them in the GetUnmatched query? Is there a correct method for parsing the file names in the photo directory and then doing the comparison? Am I on the right track at all? Thanks for taking a look at this. Dave -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ~| 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:324781 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
eSignature
Has anyone incorporated eSignatures into a CF application? embedding into a document or anything? Have a client that wants to capture an eSignature from the end user (client) regarding approved documents. TIA! ~| 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:324782 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: using CF to eliminate old Real Estate photos
Thanks for the info, Rick but unfortunately, the MLS numbers currently vary between five and six digits. If that Real Estate market stays this bad, they may go to seven or eight digit numbers. However, is it possible to create a list from the query Photos and Remove a character from the right side of the field? Thanks again. -Original Message- From: Rick Faircloth [mailto:r...@whitestonemedia.com] Sent: Tuesday, July 21, 2009 4:24 PM To: cf-talk Subject: RE: using CF to eliminate old Real Estate photos Without being able to test it since I use MySQL instead of SQL server, I think the problem is the use of %Name% in that manner. You might try taking your MLS number query, GetAll, and loop or output that over a second query, deleting the photo if its name isn't found. cfoutput query = GetAll cfquery name = selectMatchingImage datasource=#dsn# selectname from photos where left(name, 5) = '#GetAll.mlsNumber#' /cfquery cfif selectMatchingImage.recordCount eq 0 cffile action = delete file = #expandPath('/photos/#selectMatchingImage.name#')# /cfif /cfoutput That works with MySQL 5. You'd need an equivalent for SQL Server for the left(name, 5) if that doesn't work. This also assumes that the MLS numbers are always the first 5 digits, and not more or less. Hope this helps somehow... Rick -Original Message- From: Dave Long [mailto:d...@northgoods.com] Sent: Tuesday, July 21, 2009 4:06 PM To: cf-talk Subject: using CF to eliminate old Real Estate photos I program and host for about 15 Real Estate Agent/Brokers in our area using a server with CF5 installed.. The company that provides server management for our local Realtor's association sends a zipped file of modified photos to my server each night. The file contains new listings and updated photos for existing listings but does not address the problem of accumulating expired or sold listings. Even if I set the directory capacity to 3 GB, sooner or later the directory will fill up. Therefore, I have to come up with a scheme to remove the out-of-date photos to avoid reaching the directory's maximum allowed space. So far, I have succeeded in creating a complete list of current MLS numbers from the multiple tables this provider uses (query name: GetAll) and a complete list of files contained in the images directory (using CFDIRECTORY name = Photos.) Both of these queries produce exactly the data I expect. However, I believe the hitch in my get-along comes from the file naming convention used by the provider. They allow 12 photos per listing and name each of photo by adding a letter to the end of the MLS number, so that photos for MLS # 9 are named 9a, 9b, and so on. Well, I thought I had it figured out. I tried to create a list of unmatched files using this query: CFQUERY name=GetUnmatched dataSource=#DSN# SELECT Name FROM Photos WHERE %Name% NOT IN (cfqueryparam value=#valueList(GetAll.MLS_Number)# cfsqltype=cf_sql_integer list=true) ORDER BY Name /CFQUERY and then use a CFFILE tag to delete the records found in the unmatched list. However, I get an error when I run it. You can give it a try at http://www.newnorthrealestate.com/GetMLSnew.cfm ( It takes a while to generate the lists and you'll have to scroll way down to see the error message) Question: Can the wildcard % be used they way I have them in the GetUnmatched query? Is there a correct method for parsing the file names in the photo directory and then doing the comparison? Am I on the right track at all? Thanks for taking a look at this. Dave -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ~| 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:324783 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: eSignature
Or if there is a way to use CF to verify that a document (DOC or PDF) has been electronically signed?? On Tue, Jul 21, 2009 at 5:38 PM, Randy Adkins cfdev2...@gmail.com wrote: Has anyone incorporated eSignatures into a CF application? embedding into a document or anything? Have a client that wants to capture an eSignature from the end user (client) regarding approved documents. TIA! ~| 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:324784 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: using CF to eliminate old Real Estate photos
substring(name,1,CHAR_LENGTH(name)-5) If the name was 123456a.jpg, this would give you 123456. I hate to be the bad guy but for the record, your troubles stem from a poor database design. Ideally you shouldn't have to resort to string manipulation to tie a record in your photo table to the MLS number it is associated with. I don't know what columns you have in your photos table, but one of them needs to be the MLS number (or whatever other unique key you might use to specify a listing). The column should have an index on it and probably have a foreign key constraint to your master listing table. It is not possible for you to properly use an index right now on your name column if you are performing string manipulation on it. Performance might suffer if you have a large number of records in that table since every record must be scanned, and the substring must be performed each value to find the matching ones. Also, where is the GetAll query coming from? If it is a select being run against the same data source, why not do a join and get your list in a single query? What do you do with old listings? Do you delete them from whatever table they are stored, or do you set some status column? ~Brad Original Message Subject: RE: using CF to eliminate old Real Estate photos From: Dave Long d...@northgoods.com Date: Tue, July 21, 2009 4:41 pm To: cf-talk cf-talk@houseoffusion.com Thanks for the info, Rick but unfortunately, the MLS numbers currently vary between five and six digits. If that Real Estate market stays this bad, they may go to seven or eight digit numbers. However, is it possible to create a list from the query Photos and Remove a character from the right side of the field? ~| 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:324785 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4