Re: Article on F'd Company mentions using CFML
The link in the original article to Pud's blog ends up giving me an error. Here's one that works: http://pud.com/post/9582597828/why-must-you-laugh-at-my-back-end ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347344 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Article on F'd Company mentions using CFML
Passing this along as an FYI for fun. Came across this on the High Scalability blog. Talks about what the creator of F'edCompany uses for his backend (hint - uses CFML): http://highscalability.com/blog/2011/8/31/pud-is-the-anti-stack-windows-cfml-dropbox-xeround-jungledis.html His Twitter feed points out something I'd never heard before. If you go here, you'll see a CF error message: http://investor.apple.com/Application.cfc ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347341 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF9's cfmail remove attribute not working at Crystal Tech
Jochem, that's an interesting idea and I'll give it some thought. The downside is that it will slow down page processing somewhat since sending mail would be synchronous. Thanks. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344235 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF9's cfmail remove attribute not working at Crystal Tech
Uh, well, that's what I suggested in my original post. :-) I wanted to see if anyone else had experience with better ideas. Thanks! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344234 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF9's cfmail remove attribute not working at Crystal Tech
Thanks, Russ. Interesting. I've always ruled out using CF's temp directory for security reasons. I'm on shared hosting at CT. If I'm generating PDF invoices and account statements for customers, seems like I don't want them sitting around in the temp directory where other people on the same box could get into them. That's why I always have managed my own temp directory in my dir tree. Make sense? Or do you think there's a better way? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344225 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CF9's cfmail remove attribute not working at Crystal Tech
I just spent an hour working with a tech at Crystal Tech diagnosing an email problem which ended up with me realizing that the very convenient "remove" attribute that is new to CF9's cfmail tag will not work in their environment. The reason for this is that they don't use CF's built-in mail client, instead handing off to SmarterMail. So although CF believes an email has left the spooler and its attachments can be deleted, SmarterMail will still come back for them but fail when it finds the attachments are gone. What do people recommend as a viable way to deal with this (I assume everyone had to deal with this anyway before CF9)? Is the answer to set up a scheduled task that cleans out some directory of email attachments at regular intervals? db ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344173 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Q re new CF9 Spreadsheet* functions
Den - Thanks for the info. I'd never heard of JExcelAPI but I've used Jasper on some previous Java-based contracts and, yes, it's great. Problem is that this client is on shared hosting (CrystalTech) so my ability to install 3rd-party libraries is essentially zero. Unless someone knows of a pure CF way to manipulate Excel files. :-) With the PDF idea already working, what I'd really prefer at this point is a better way to control the contents of those. The only way to do so on a stock CF9 install is through HTML wrapped in (please anyone correct me if wrong) and that means using CSS which isn't well covered in the bundled HTML-to-PDF libraries. :-( Cheers, db ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344128 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Q re new CF9 Spreadsheet* functions
The Excel approach seemed like a winner but in the end, I had to ditch it. In the end, I hit what appears to be a well-known problem and a known limitation for . The current design of the spreadsheet functionality makes it hard (impossible?) to optimally share cell formats across cells and that makes Excel hit an internal limit. Excel then decides on its own which cells will not receive any formatting. I am setting the cell formats for a few hundred cells in the worksheet although there are only 4 or 5 truly unique formats. That works fine until I then create many similar sheets within the same workbook. When you open the XLS in Excel, you get an error message re "Too many different cell formats". (see http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=82627 for Adobe's bug report and http://support.microsoft.com/kb/213904 for background info) My theory then is that every time you call spreadsheetFormatRow or spreadsheetFormatCell, the underlying library CF uses does not optimize how the format is applied. I experimented but couldn't see a way through the CF API to force it to be smarter. In the end, I had to back off to making a PDF which, with CF's PDF library CSS limitations meant no rotated text. In the meantime, a few notes to help those in the future: - when setting a format struct's rotation value, use a string for negative values, i.e. format.rotation = '-60' or you'll get an exception. - I could not get formats to work at all unless I set a cell value, even if to an empty string. This leads to another problem: - Setting cell values is SLOW. I looped through a grid of 20x16 cells, setting them to the empty string. That added generation time of 8 seconds. - Setting column widths and row heights was unreliable for me unless I did that after all cell formats were set. - It's unclear what the value is that is passed to spreadsheetSetRowHeight/ColumnWidth. The doc says it's in points. When I set it to X and then look at the resulting spreadsheet in Excel, Excel tells me a different value than X. db ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344063 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Q re new CF9 Spreadsheet* functions
Leigh - Curious what you mean by 'acheived with xml'. What would I feed the XML into? I have made progress experimenting with the spreadsheet functions and for the most part, things work well including text rotation. I wish there were a way to set the default page size in Page Setup but I can leave that up to the operator if I have to. The main issue so far has been that things are a bit underdocumented and required some experimentation to get them to work but nothing insurmountable. When I'm done, I'll post some info back here in case it helps people searching in the future. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344031 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Q re new CF9 Spreadsheet* functions
Alternatively, if someone knows how to do rotated text when generating a PDF, I'd love to learn how. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344017 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Q re new CF9 Spreadsheet* functions
A customer is asking me to generate an Excel spreadsheet and I've never used the new functions in CF9 (their requirements preclude me from going the "old" way of generating HTML and setting the MIME type to Excel). Two q's after I've done some research both with Google and Adobe's docs: - how does one set the paper size that I'd usually set in Excel's File -> Page Setup dialog? It needs to be set to A4. I don't see this in the API. - the doc requires formatting some cells with rotated text. Has anyone already tried this and run into issues re compatibility, functionality, etc? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344016 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: What event specifically triggers OnApplicationStart?
Ian Skinner - I owe you an apology. After studying the access logs from the web server, I can't say with 100% certainty but it looks like this happened because someone hit the web server using an IP address. They didn't use the password to force a call to OnApplicationStart so it must have been right after a server reboot. I've rewritten that code to be more robust. :-) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343419 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: What event specifically triggers OnApplicationStart?
>On 3/28/2011 11:10 AM, Dave Burns wrote: >> My code looks like this: >> >> configName = "dev" >> if CGI.SERVER_NAME contains "blah.com" >> configName = "production" > >Which means that if I (or any joker poking at your site to see if they >can do something) who requests your site by its IP address could set >your production server into dev mode. > >CGI.SERVER_NAME is probably populated, but it is populated by what I put >into MY browser, just as long as that resulted in a request to YOUR server. Well, since that code is in OnApplicationStart, only if you either a) knew the secret URL param and value to force a call to OnApplicationStart() or b) got lucky and were the very first page request to the app after a server restart. Both are possible but improbable. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343368 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: What event specifically triggers OnApplicationStart?
> On said diagnostic page, what is the value of CGI.SERVER_NAME and CGI. > HTTP_HOST when the configName's value is "dev"? Bill - That's the key question. My diagnostic page only dumps the current config, not how it got there. I'm going to change that. Since I don't get an exception thrown within OnApplicationStart, I can assume that CGI is defined and CGI.SERVER_NAME is also defined. The only thing I can say is that, assuming my theory is right, the value of CGI.SERVER_NAME does not contain "blah.com" when I think it should. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343366 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: What event specifically triggers OnApplicationStart?
>One thing to keep in mind, if you do not have a *unique *ApplicationName on >your server, then the variables could be shared w/another application--which >is especially dangerous on shared hosting. > >I've seen people roll out an application w/a common ApplicationName like >"MainApp" and have issues w/their App scope being shared w/another >application that also used a name of "MainApp". Same thing happens if the >Application.cfc/cfm doesn't define a ApplicationName. > >IMO, the safest thing you can do is name define ever ApplicationName with a >hash of the current directory path: > > > >That way you can use the same code w/every Application.cfc, but your >virtually guaranteed to have a unique ApplicationName. > >-Dan > Dan - That's a good tip but the app name is unique and I've verified that there are no unintended conflicts by dumping the application object's variables. (But, yes, I'm on shared hosting - meant to say that.) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343365 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: What event specifically triggers OnApplicationStart?
>I think I can see one possible cause of your problem Dave. >You may actually have 2 applications running. > >one on yourdomain.com >and another on www.yourdomain.com > >So if someone goes to yourdoamin.com and then www.yourdomain.com they will >NOT be seeing the same application. So perhaps most people go to >www.yourdomain.com, but every so often someone visits >yourdoamin.com instead, which would restart the application if it was >outside the timeout >period. > >To avoid this you need to add a redirect, so that only 1 domain is in use. >either redirect www.yourdoamin.com to yourdomain.com or vice versa. > >And also change your code to explicit to avoid this problem > >if CGI.SERVER_NAME IS "blah.com" > >else ... staging >else ... dev >else redirect to blah.com > Russ - I'm not sure I follow 100%. Whether the subdomain is there or not, IIS is configured to point to the same docroot so the same code will execute. I thought that the code manipulated the same application object if this.name was the same (which it is regardless of subdomain). Or am I missing something? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343364 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: What event specifically triggers OnApplicationStart?
> It's entirely possible that (a) the server is stopping and restarting, > which will cause all applications to stop, or (b) there's an explicit > call to onApplicationStart somewhere within your code - this is > actually pretty common. Dave - For the sake of argument, if the server is restarted but no one hits a single page on the app, OnApplicationStart won't run right? So if it takes a page hit to call it, CGI should be defined, no? I just grepped my entire code base. The only call to onApplicationStart is my code in OnRequestStart which looks for a magic URL param. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343362 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: What event specifically triggers OnApplicationStart?
>memory variables only timeout if they are not accessed the specified timeout >period. >every time anyone loads a page on your site, it accesses the application >scope and their session scope, so the timeout is reset back to 0. > >An application will restart when ColdFusion restarts, when you reach the >applicationTimeout, if you force a restart via code or via the >CFADMIN/server monitor To confirm my understanding, are you saying that on a very busy site, it's possible that OnApplicationStart might never run again once the app has started? (server admin and restarts aside.) Since the app is running fine for months and then all of a sudden switches configs, something else then must trigger a call to OnApplicationStart but with a screwy environment. (I'm going to add logging to track this down but I can't predict when the problem might happen again.) >When you say you use cgi.server_name to determine which variables to use, >are you being VERY explicity, as in the SERVER_NAME must match EXACTLY, or >are you doing an if/else to say if its this then set as live else set as dev? My code looks like this: configName = "dev" if CGI.SERVER_NAME contains "blah.com" configName = "production" I can tell from a diagnostic page I have that configName's value ended up being "dev". Fixing the problem is as easy as forcing a call to OnApplicationStart by hitting a special URL. Which makes me wonder under what circumstances OnApplicationStart can be called without CGI being set properly. Strange. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343357 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
What event specifically triggers OnApplicationStart?
In Application.cfc, I know that OnApplicationStart is called when an application starts. I'd like to define that better. From what I've read, this is when the first page is requested from an app (also possible are event gateways and Flash remoting but I'm not using either). So, if I say: this.applicationTimeout = CreateTimeSpan(1, 0, 0, 0); in my Application.cfc and a day goes by since calling OnApplicationStart, isn't it true that the server doesn't invoke my code on its own (like a cron job). It waits for a day to go by and then invokes OnApplicationStart on the next page request - even if that request is hours later? I'm asking because I'm trying to track down some odd behavior in a customer's app. The OnApplicationStart code looks at CGI.SERVER_NAME to determine which config file to load (production, staging, dev, etc.). Twice in the last 6 months, the production system starts to think it's a dev system. Are there cases where CGI.SERVER_NAME could be empty or undefined or... when OnApplicationStart is called? Can I trust that CGI var's are always set correctly in this scenario? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343352 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: (ot) redirect and referer
Key concept to understand though re the original q is that the HTTP_REFERER field is set by the browser and there's nothing you can do on the server to tell them how to set it. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341999 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Am I looking for a shopping cart? Or just SQL design pattern?
Thanks, Scott. I'm pretty good at data modeling so I feel like, with enough time, I can solve this problem well. But that's when it occurs to me that this has been solved by many before me who have the benefit of hindsight. Maybe I could save my client some money by either recommending they buy something or I could at least take someone else's schema and start with that instead of from scratch. BTW, it's not just about normalization. It's also thinking ahead about the requirements for audit trails, historical reporting, knowing what data can be changed and what is never allowed to change once recorded, etc. db ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341991 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: META: email notification for single threads?
Thanks, Michael. The ideal is what I've seen on other forums: a checkbox for each thread that anyone can check if they want to subscribe to that thread via email. Then, if you create a thread or add to it, the box gets checked for you by default. db ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341989 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Am I looking for a shopping cart? Or just SQL design pattern?
I've inherited a site at a customer and the previous (several) people working on this code did them no favors. For example, it's an e-commerce site and the table that records sales keeps track of the user id and the amount paid but not what product was bought or the form of payment. There actually IS a record of what the user bought but it's stored in their user record which is overwritten with each purchase so any history is lost. In addition, the site has discount-codes (coupons) but those are stored with the user, not the transaction so history is lost there too. In addition, I've noticed that discount codes are re-usable and can be edited without saving history so if you change the discount amount for future sales, running a historical report for sales involving that discount code are now bogus. I've been asked to fix this. I wonder if there is a standard pattern for the schema here since it must have been done a million times by now. I have never used an off-the-shelf shopping cart package either - I have always assumed that those are more about maintaining sessions/carts and interacting with payment gateways but it occurs to me that maybe they include the schema design I'm thinking of that allows proper accounting audit trails, etc. Any advice? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341972 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
META: email notification for single threads?
I don't want to subscribe to emails for all of cf-talk because of the high volume but I do want it for threads I start and/or contribute to. Is there a way to do only that? I haven't been able to find it. Right now, I leave a browser tab open to the thread and I refresh it a couple of times during the day. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341970 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Need 2nd pair of eyes: why doesn't this code work?
Sigh. FML. Thank you. Now, how to delete this thread or at least remove my name from it? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341621 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Need 2nd pair of eyes: why doesn't this code work?
I'm having one of those moments where something seemingly trivial isn't working. I'm sure I'm missing something obvious. I have a custom tag that takes and attribute named "year" and outputs the number of years since then. So, my test.cfm looks like this: I'd expect that to output "41". I tried to be smart though and put code in the custom tag to detect whether year was passed in and if not, output an error. It didn't work and it boils down to my use of IsDefined on the attribute. Here's the current code for the tag: year is definedyear is NOT Defined #year(now()) - ATTRIBUTES.year# When you run it, the cfdump line shows that the attributes scope contains a value named "YEAR". The 2nd line though says that year is NOT defined. But the 3rd line works anyway. So, what am I doing wrong in the 2nd line re testing that the attribute exists? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341617 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Choosing between ColdFusion Builder and IntelliJ
Thank you to all for the replies so far. Very helpful. Now that I've had some time to evaluate CFBuilder, I'd like to revisit this thread. I'm not bashing on CFB here - honest questions: considering that I'm not starting from scratch but already have the functionality of DreamWeaver at my disposal, I'm struggling to figure out the *incremental* value of CFB. Things I like about CFB are the code completion (member functions, etc. although it doesn't always work), the *idea* of a community of extensions, and easy refactoring. Things I wonder about: - I see RDS but I don't understand how that can compete with having SSMS in another window. - I see the TailView but I'm used to opening 'tail -f' in another shell window. - I see the plugin for Subversion integration but I have TortoiseSVN hooked into Windows Explorer. - So far the idea of extensions are great but I can run things like varscoper standalone without much effort and (correct me if I'm wrong!) but Apptacular is meant for the ORM features in CF9 and I have customers on CF8 so I'll keep using PU-36 standalone. In short, what I see from CFB is a lot of tools integrated into one window. It feels "tidy" but I'm not convinced there's *real* value there (beyond what I get with DW). What am I missing? Thanks, db ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339816 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Choosing between ColdFusion Builder and IntelliJ
I'm considering moving on from Dreamweaver and finally using a better IDE for CF work. I know of CFBuilder and have downloaded the trial to eval. I used IntelliJ for some Java projects 2 years ago and it was outstanding. My current take is that price is equal and functionality is *roughly* equal with each having its own strengths. The one big issue for me is that CFBuilder already has a (small but growing) community of extensions. I like the idea of Apptacular, varscoper, etc. all built-in. My concern over IntelliJ (or more accurately, the CFML plug-in for it) is the lack of a large enough user base to support the demand for these CF-specific extensions. I'm curious to hear thoughts and get feedback re the choice. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339366 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Key management for PCI DSS compliance
I have a client I'm helping with their PCI compliance effort. One question I have is where to store the key that encrypts account numbers, etc. Right now, it's in one location in their CF code. Is there a better practice? I understand that storing it in the same database that contains the encrypted data is a no-no (seems sensible). The cost of an external HSM box just for key management seems prohibitive. Is there an easier way that others here have used? Thanks, Dave ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336254 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: How to protect a section of output from page break?
The doc says that property is supported though which makes me wonder: a) do only certain values for it work and b) maybe it needs to be applied to a specific HTML element for it work? Or both? I've done some experimentation and so far I haven't hit the magic combo - assuming it can be made to work at all. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335484 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
How to protect a section of output from page break?
I'm trying to generate a PDF w/ CF9. It contains a series of tables (average 10 rows each) and when it's printed, I don't want a page-break to happen within any one table. The doc for cfdocument says it supports the CSS style 'page-break-within' which should let me protect the tables against this but I've had no luck making it work. Does anyone have any examples of this where it does work? I'm at the point where I might just try doing the math myself and get it 85% accurate but I'm hoping for something less kludgy. Thanks. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335479 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Best way to handle 404s on CF7?
I have a client with a CF7 site on shared hosting (CrystalTech). They wanted a nice 404 handler page so I set one up via IIS. This only caught non-CF files (e.g. .html). Any CF file (like cfm, cfc, etc.) was still be handed off to ColdFusion which would return a 404. I had CrystalTech change the IIS setting for this site for it to verify existence of all files no matter the file type. This worked well or so I thought. I see now that all Flash features are busted (cfchart, cfcalendar, etc.) and returning 404s. A little Googling shows this is a known thing in the CF world. ColdFusion handles Flash features like this by referring to non-existent files and then intercepts requests to these "magic named" files. This breaks if IIS is testing for file existence first. The solution frequently recommended is to create a 0-length file of the name CF is looking for to make IIS happy. Questions: - If I go that route, CF seems to look for some files in my docroot and some files in the CFIDE dir. I can't get to the latter in shared hosting so seems like this isn't the way (?). - The files CF looks for in my docroot have crazy numbering in them. Is this a stable URL or do I need to create a zillion dummy files? - This would all be easier in CF8/9 with the OnMissingTemplate handler but the upgrade from CF7 is a ways off. Is there any equivalent in CF7? I'm in shared hosting so don't believe the CFIDE site-wide handler is an option. Any suggestions? Thanks, Dave ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335387 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: How to find base URL of an application?
Jason - Thanks but I need it to be more than just the server name. I need it to figure out where it is even if it's a few directories down from the root. In the end, what I decided to do what move my logic out of the init code for application.cfc and into the OnApplicationStart code where I have access to the CGI structure. I then do this: application.rootURLPath = GetDirectoryFromPath(CGI.SCRIPT_NAME); It seems to work so far. Curious if anyone sees any gotchas. Thanks, Dave ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334394 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
How to find base URL of an application?
In my Application.cfc's init code, I'm trying to set a variable in the application scope that is the base URL for the pages in the app. I need this to overcome some issues later with relative and absolute paths (using CF7 so app-specific mappings not possible). I'm having some trouble calculating this robustly and I wonder if I'm overlooking something simple. It's easy to get the base file path. I just use: this.rootFilePath = GetDirectoryFromPath(GetCurrentTemplatePath()); But then I want to calc this.rootURLPath. So if the application is located in the docroot (e.g. d:/inetpub/mysite/), I'd just get '/'. If it were located elsewhere (e.g. d:/inetpub/mysite/a/b/c/), I'd get '/a/b/c/'. I can't use any of the CGI variables because at this point, we're not in the middle of an HTTP request. What I want is the string overlap between rootFilePath and CGI.script_name. Any ideas? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334381 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Custom tag paths on shared hosting - shared globally?
I'm trying to debug a config issue with CrystalTech as I upgrade a client from CF7 to CF9 (both of them are shared hosting, not VPS). Testing yesterday, I got an error about not having permission to read a tag from some path that was some other customer's site on the same machine. I emailed support and the end result was them saying that custom tag paths are shared amongst all people on the same machine and that my custom tag had the same name as another user's on the same machine and that was the problem. I would need to change the name of my custom tag to resolve the conflict. Why does this not show up on my client's CF7 shared hosting? Lucky I guess: because no one else on that particular machine has a conflicting tag. I'm not sure if I should be shocked or not. I thought even in a shared hosting environment CF must give hosting providers some way to sandbox these things. Is this a CrystalTech issue or will this be the case for any shared CF hosting provider? I have no issue changing the name of the tag. It's tedious but not hard. Also: now that my client is moving up from CF7, will the new feature in CF8/9 that allows per-application mappings and tag paths resolve this? It would need to replace the global settings rather than just augment them. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333901 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF 9 Hosting
I have a client who we just moved off of HostMySite. We had a VPS there and we learned there was no firewall device in front of it. Never knew that. A bit of a surprise. I have another client on CrystalTech and for the most part, their support has been great. I always get a response within the hour (any time of day) from someone who isn't just reading from a script and telling me to do things I said I already tried. System up-time has been just fine too. I have had one incident there though that left a bad taste in my mouth: We needed CrystalTech to do some work setting up a DSN from another machine. It wasn't working so the tech, without telling us, made some changes to our database config. Our site went down and he finally got things working again by restoring a day old database backup. Now we had data out of sync that we wanted to retain. My client paid me to do the tedious work to sync things back up. I also spent time with CT's support figuring out what went wrong when their tech finally admitted in writing that he had made the mistake. With that knowledge in hand, my client then asked CT to reimburse him for at least some of what he paid me to fix things and they refused. The galling thing was that the person there who refused (some VP) did so in a way that made it clear he was not even aware of all the facts, i.e. that it was their own mistake. I don't think my client ever resolved it with them but they aren't as great as he thought they once were. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:333900 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Custom search engine
Dave - An issue is that there is not a 1:1 correspondence between database entries and pages. I actually think the database aspect of dynamically creating pages is not the big issue. The majority of the issue is that this site is not well structured and has a web of include files and custom tags that are each included on multiple pages under certain conditions. The site is old and was never designed as a whole: they have a very limited budget so they make changes incrementally - we've all seen where this approach leads. So, this is why I keep pushing the spidering idea. I understand I may give up some fine-grained control over the index but, given the limited budget, a spider approach that can generate a Verity index seems the best way to stay within their budget. In spite of the above, I remain open to alternative approaches and very much appreciate the suggestions made on this thread. - Dave ~| 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:332490 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Custom search engine
Dave - I've spent the evening reading doc for Verity and Googling for info but it still seems my take is right. Verity can index static files or database query results but not dynamically generated HTML. The content of my client's site is complex enough that indexing database query results doesn't map well to dynamic pages. The right tool seems to be a spider but then what to do with the spider's results? I can think of a hack where the spider creates a shadow directory tree of the real content and then I cfindex that but tell cfindex the URLprefix of the original tree. Any thoughts on feasibility? -Dave ~| 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:332477 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Custom search engine
[This is veering slightly off the original topic so let me know if I should start another thread.] CrystalTech has gotten back to me and they support Verity. My client is on a shared hosting plan so CT supports the cfcollection and cfindex tags but not the Verity spider. (The spider is only supported for VPS customers since shared hosting customers aren't allowed to use the cfexecute tag.) This is where my inexperience with Verity comes in and hopefully one of you can help. If I point the cfindex tag at the root of my client's web site, it will index the contents of the .cfm files, not the HTML they generate - correct? So, if I can't use Verity's own spider, I need to use a different one. There are tons of spiders out there but I'm not sure what format they need to output to generate an index for Verity. Anyone know the answer? Dave ~| 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:332428 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: FarCryCMS versus Mura
Malcolm - Thanks for replying. I'm just starting to work out the customer's requirements so I can't give a precise list yet. I think my biggest up-front challenge is cultural: they're used to going into any page and modifying it at will. This seems like it's very efficient for them and lets them have exactly what they want on each page but I'm trying to convince them that some of the pain they're starting to feel is caused by the lack of a managed approach and that to gain cost efficiency, they'll have to give up a certain level of "micro-control." The entire site was written years ago (well before I entered the picture) and is basic CF, no framework, no templates for web-pages, etc. I raised the CMS idea with them when they wanted to do something simple - replace an image in their page header - and I told them that the relevant tag exists in 260 .cfm files. Who knows how changing it with a global search and replace will affect the table-based layout on each of those? I also raised the CMS idea because their budget is extremely low and having me revamp the entire site is not an option - unless I can point to something like this that pays back over time. In keeping with the thread topic, I welcome input on what questions to ask in order to determine my requirements. Also, are there certain requirements that would make the decision for me? Etc. db ~| 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:332406 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Custom search engine
I had contacted CrystalTech in parallel and it turns out they do support it out of the box but it's not clear they support the Verity spider. I'm sorting it all out via support emails with them now so I'll post back if/when I have it all worked out. ~| 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:332404 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Custom search engine
Thanks, Barney. I've used MySQL's FULLTEXT capabilities in the past with good success. I should clarify that we're using SQL Server 2008. I think that has some similar abilities. I agree though that the overall approach is not ideal. I'm hoping someone has a combo of some spidering scripts I'd run with a cron job and then a CFC for the search functionality. I have a strong feeling that's a looong shot. Dave ~| 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:332354 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Custom search engine
I have a customer who would like a search function for his web-site but does not want to use Google's custom search service. They use shared hosting (CrystalTech) that does not offer Verity or Solr (I believe this is true but am confirming with them). Given those constraints, does anyone here know of an alternative? I understand the complexity of the problem so I'm not 100% surprised I've found nothing with a little Googling around. Thanks, Dave ~| 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:332349 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
FarCryCMS versus Mura
I have a customer who may want to migrate to a CMS and I've told him to consider FarCry or Mura although I have zero experience with either. I can't find many resources around that give a solid comparative review. Can anyone here either point me to one or, if you have experience with both, give me your thoughts on pros and cons of each? Thanks, Dave ~| 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:332347 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Migrating to CF9: trouble getting JRun working with SSL
> This might be a stupid question, but is there a reason why you're > configuring the JRun web server for SSL instead of just using, say, > Apache? Because that's the approach I'd recommend. Mainly for simplicity. So far I've gotten the job done without installing extra software I have to configure. It's worked so far. I don't see why it can't be made to work again. Famous last words maybe. > I realize that's not much of an answer. What's in your JRun log > files? I've looked through all .log files in my CF9 install dir but don't see anything interesting. I may not know what to look for. Do you know which file JRun might log errors to? Dave ~| 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:331387 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Migrating to CF9: trouble getting JRun working with SSL
I have a client on MX7 who wants to migrate to CF9. I have a dev environment for them on my WinXP machine where I've configured MX7 to run with JRun's built-in web server. I've had that working for a long time with both regular and SSL connections. I installed CF9 yesterday side-by-side with the existing MX7 install. The install was smooth and detected MX7, adjusted CF9's port numbers for no conflict, etc. Testing started well: MX7 over regular and SSL still worked and CF9 worked over regular HTTP. But I can't get CF9 to work with SSL. I installed a new certificate with keytool, FireFox (v3.6) complained about it being unsigned, I added it to the exception list, and now I get this: Secure Connection Failed An error occurred during a connection to localhost:9101. Peer reports it experienced an internal error. (Error code: ssl_error_internal_error_alert) I've been Googling that in all variations but can't find much help to get past this. I don't see any info in any log files either. FWIW, here's my SSL config from SERVER-INF/jrun.xml: true * 9101 {jrun.rootdir}/lib/mykey *deleted* {jrun.rootdir}/lib/trustStore jrun.servlet.http.JRunSSLServerSocketFactory false * false Anyone here know of any issues re setting up SSL and CF9? Anyone had success with it? Dave ~| 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:331384 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm