One of the things that sometimes trips me up is the whole idea of references. I'm not talking about stuffy books in the library. I'm talking about the idea that setting one variable to another can sometimes create a pointer to that item rather than a copy. Now before we chat about it any further we should get square on the difference between a "primitive" or "simple" data type and a "complex" or "emotionally involved" data type.
I like to think of "primitive" data types as "one level" members of any scope. I also like to think of them as little cave men in loin cloths running around and clubbing defenseless mammoths - but that is perhaps too much information. There's actually a pretty short list of primitive data types. In fact, "short" actually is one of the data types I believe. In the CF world a primitive Datatype would be a string, number or possibly a date. Of course the actual list is more like "short, long, float, double, int, string, byte" - but it is probably more useful (for the purpose of this post) to consider String, Number and Date. Check out this example.Read More
This is an immensely complicated issue that will take you days and weeks to sort out. What you need is to know the day number you are looking for (1=Sunday, 2=Monday, etc), The month number (where 1 = January, 2 = February etc.), and the year (where 2009 = 2009, 20010 = 20010 etc.). Then you need to download this handy function from cflib.org called FirstXDayOfMonth, written by a Mr. Troy Pullis. Pass in your values and it will give you back the first occurrence of that day in the month. Add 7 to it get the second occurrence, 14 to get the third etc. Here is an example:Read More
I've been batting this around for a few days now. Recently, Mary Jo Sminkey of CF Webstore fame posted a note to an email list about the recent requirement by Authorize.net that incoming requests to their API use SSL 3.0. I confess to being unaware of the differences between SSL 2.0 and 3.0. So I set out to discover for myself. To start with SSL 2.0 uses weaker handshaking. A requesting client can, it seems, edit the list of preferences leaving the server no choice but to hand shake with the "lowest common denominator" cipher. There are some other issues as well dealing with how the packets are constructed etc. So the consensus is that SSL 2.0 is the weak sister and should be deprecated. For its part SSL 3.0 has been around for a decade or so and is widely supported.
The question is, will my CFHTTP calls from ColdFusion 6 or Coldfusion 7 still work when Authorize.net disables SSL 2.0? To answer this question I got some great help from Scott Krebs over at Edge Web. He dug out three or four URLs that were really helpful. I've included them at the bottom of this post. I also got some guidance from the Stephen Hawking of cryptography, Mr. Dean H. Saxe (the H is for Holy Cow he knows a lot). The answer is a qualified yes. Anyway, here's what I did to test while I wait for Authorize.net to get their act together and set up a test bed.Read More
Using ColdFusion means leveraging the power of Java. ColdFusion encapsulates a large percentage of the Java web universe and makes it available to you through native tags, but a vast array of additional functionality is also available through the use of Java Libraries. The truth is, however, that working with Java in ColdFusion can be frustrating for the non Java programmer. Sure there are some easy things you can utilize like getClass() and toString(), but what if you have some Java sample code and you just want to pull it into your Coldfusion page? How do you do that? Here's a short example I created in response to a recent CF Talk post. The setup is that Authorize.net sent a memo to everyone telling them that SSL 2.0 would no longer be supported as of late March. There was general agreement that CF 8 could handle SSL 3.0 but what about 6 and 7?
It turned out that both 6 and 7 are compatible as well (as of 1.4.02), but along the way I got the idea to grab the Java code from Authorize.net and give it a whirl in Coldfusion as a sort of test run at bypassing cfhttp. I've done this many times with other products as well (custom libraries, IBM's MQ series etc). So I wrote this post to show the process I went through to unpack Java Code into ColdFusion.Read More
Muse reader Eric Cobb, whose CFgears blog is an great read, made an excellent point regarding my statement that the designated server for a CFMAIL tag should be a full qualified domain name instead of just an IP address.
I got to thinking about this and I wanted to be sure - so I ran a test. Here's what I found.Read More
Recently I migrated a server from ColdFusion 6.1 to ColdFusion 8.01. Typically such migrations are a walk in the park. There are very few things that go wrong. I'll save my check list for another time, but here is one that is new to me. I had some code that utilized the UPS rate checker API. It was fairly straight forward stuff. But for some reason it began throwing a strange error soon after migrating. Here's the scoop.Read More
Most Muse readers know I'm a fan of Cfscript. I often use it in the sample code as well as in the code I write and demonstrate. I use it frequently for a couple of reasons. One reason is that I have an easier time of commenting with cfscript because I can just add a couple of slashes, type a comment and hit enter. I also like cfscript for working with CFCs. For me the code ends up being more readible. As you probably know you can save a few lines with Cfscript as well. Consider the following example:Read More
The muse has a few posts that are more popular than others. The post on Update Using a Join is legendary (in my own mind) and has achieved popularity even on SQL forums and blogs. My posts on interfacing with a HP e3000 or using Webspere's MQ Series.... eh... not so much. Among those posts on the popular side of the spectrum is the post on Troubleshooting CFHTTP. This little gem is hit more often than a quarterback for the Detroit Lions. Why? Because CFHTTP relies on a number of things that are outside of ColdFusion's control - like DNS, Networking and sometimes SSL. Today I was on the phone helping a site owner come to grips with just such a problem.Read More