First things first, yes it is fine to delete this file. Make sure you know why it is growing so large - there may be errors you should be concerned about, and this file merits your review. In order to delte the file you will have to stop coldfusion. Upon a restarting Coldfusion will actually recreate the file starting with a nice tidy 1 kilobyte. You might notice that the "event" log actually "rolls over" every 200k. Wouldn't it be nice if the err log did that too? It can...Read More
When you are debugging a CFC and you throw an error, you sometimes get a dreaded "page cannot be displayed" message. The reason this pops up is that the "output" attribute of the component is set to "no". If you set the output to "yes" you will see the full error messages.
Getting an web application deployed can be very challenging. The word that comes to mind is "messy". You can do some things to tidy it up like using INNO, or use the deployment options provided by CF or J2EE, but the truth is that someone is going to have to "fiddle" with the configuration options until they are right. The most common settings to change are data source names and file paths. We have worked with many applications where we were required to open the Application.cfm file and directly change the values of application variables. This is not a good idea and it limits your deployment options. You may want to compile your pages and not have them open to prying eyes. Or you may be nervous about folks mucking about in the Application.cfm or Application.cfc (as well you should be). There are a couple of alternatives.
NOTE: I amended this post on 12/15 due to an error pointed out by Ray and Sean Corfield (see the comments).
Paypal has many advantages over other forms of ecommerce. One of the chief advantages is that using Paypal allows you to shift many of the tasks of monitoring fraud and ensuring validity over to a third party that is well equipped to do it. In the old days (say... 3 years ago) Paypal was considered to be a step child of "real" ecommerce (mostly because of the previous requirement to have a Paypal account). This perception still persists among late adapters, but the ubiquity of eBay and the increasing number of features offered to Paypal account holders has made a significant dent in that bad impression.Read More
Would you like to know how to create your own memory leak using the design of the Coldfusion Server to do it? Here's one way. Let's say you have a site that sells products from Narnia. It has a root folder that display your products and prices. You've done a great job of creating friendly links for browsing your Narnia products. You have stuffed Aslan lions both friendly and fearsome, White witch figurines, fauns, nyads, dryads, a toy lamppost and even a wardrobe for sale. Let's say (for the sake of argument) that you have 50 links to Narnia products just on your home page. If a user chooses to buy one of your products he or she clicks on "add to cart". At this point the user is taken into the "/shop/" folder to the page at "www.Nnarniaproducts.com/shop/cart.cfm". So far so good. This is how many online stores are organized and it's just peachy. But let's look under the hood shall we.
If you've been working with Coldfusion very long, chances are you've written a data import script. There are many tools that allow you to migrate data from one database platform or schema to another, and I'm well aware that "guru dogma" states that Coldfusion is not the best tool for things like long running tasks that can be performed by the database. I'm also a big advocate for letting the database do its job. So it may surprise you to learn that I believe Coldfusion is actually a pretty good choice in many cases - especially if you have to do anything tricky with the data. Take looping for example:Read More
In a previous blog entry titled IsDefined() Vs. StructKeyExists() - The Nuances of CFMX Structures, I illustrated the point that non-standard variable names like "33foo" can be used as keys to a structure, even though setting them directly causes the dreaded "invalid variable name" error. You may not know it, but Ray Camden's popular cfc blog software exploits this feature using his "scope cache" tag to ensure unique structure keys in the cache.Read More
Sometimes I find it necessary to duplicate an entire installation of Coldfusion MX. For example, if I'm setting up a staging server with exactly the same drives and code base as production, I will want the exact same configuration. This is actually pretty easy to do. First, install Coldfusion MX. Next stop all the services associated with Coldfusion (there are 3). Rename the "cfusionmx" folder to something else. Then copy in the "production" CfusionMX folder. If the 2 servers are really configured the same you can start the services and you are ready to go - almost.Read More