CF.Objective() in the Winter

Today is April 19th and here in Minnesota it's snowing as if it was winter. Several years ago CF.Objective() was right about this weekend. Be happy this year that CF.Objective() is next month and not this weekend. Of course there is no promise that next month will be any warmer. Let's hope for warmer weather and a little sunshine.

Then again this is Minnesota, bring warm clothes.

CFMAIL Attachments to Apple iPad and iPhone

A while back a bug was filed with Adobe's bug tracker about CFMAIL not setting headers correctly for attachments and thus causing them not to be seen or able to open on Apple 'iDevices'. I had responded that this should not be a bug because setting the CFMAILPARAM tag correctly should be enough and pointed them to my own blog post about properly sending CFMAIL. Well, I was wrong and I was right. My previous blog post had a slightly incorrect example of how to setup the CFMAILPARAM tag and thus was causing this issue. Sorry about that :(. The email headers were having the Content-type set to "multipart/related" instead of "multipart/mixed" and while I could open the attachment in every email client out there the attachments would not open on my iPhone or iPad. Granted that when I wrote that original blog post I didn't own an iDevice and never tested the code for those.

The good news is that after a little testing with trial and error I discovered the error of my code. Great news! Attachments sent from CFMAIL in ColdFusion 9.0.1 and ColdFusion 10 work perfectly. I'm presuming this will work on previous versions with the CFMAILPARAM tag.

The code: From my previous post I had this example. It all looks great. But one item causes an issue. Setting the contentID attribute in the CFMAILPARAM tag causes the email content-type to be set as "multipart/related". By simply omitting that setting emails now have content-type "multipart/mixed" set in the email header. A small but significant difference when it comes to open email attachments on the iPad and iPhone.

view plain print about
1Old Code:
2
3<cfmail to="#form.mailto#" from="#form.mailFrom#" subject="#form.subject#" type="html">
4<cfmailparam file="/document/path/mypdf.pdf" contentID="#createUUID()#" disposition="attachment" type="application/PDF">
5<cfmailpart type="text/plain" charset="utf-8">#textmessage(mailmessage)#</cfmailpart>
6<cfmailpart type="text/html" charset="utf-8">#mailmessage#</cfmailpart>
7</cfmail>
8
9New and Correct Code:
10
11<cfmail to="#form.mailto#" from="#form.mailFrom#" subject="#form.subject#" type="html">
12<cfmailparam file="/document/path/mypdf.pdf" disposition="attachment" type="application/PDF">
13<cfmailpart type="text/plain" charset="utf-8">#textmessage(mailmessage)#</cfmailpart>
14<cfmailpart type="text/html" charset="utf-8">#mailmessage#</cfmailpart>
15</cfmail>

The Moral: You can always learn something by going back and reviewing what you did in the past and taking notes.

*Note: When I write little tools like this I'm usually writing it because there is something I absolutely need to see in order to complete another project. These little tools are not written as projects themselves and therefore may not be very pretty or as full featured as something that I was writing as a complete project. I just needed to get some code running that gave me back the data I needed to see. There are no warranties or promises. If you find is useful then great. If not, oh well. I know the code works on CF10 at the moment. I can not be certain if it still works on other versions of ColdFusion. * Any code posted may not be totally secure or production ready. Use at your own risk. ** Unless otherwise noted, this code shall be deemed Public Domain.

ColdFusion 10 Install bug IIS 7.5

The other day I was installing a new ColdFusion 10 server on Windows 2008 Server for one of our clients at CFWebtools. This is a "Standard" license install so during the setup I chose to configure "All Sites for IIS" and thats when I ran into this error "Cannot configure IIS connector. Enable the required options ASP.NET, ISAPI Extensions and ISAPI Filter in IIS 7.5 under Windows Features and try again." After checking the IIS 7.5 features I found that those IIS feature were in fact installed. I tried several times and continued to get the same error.

I had to research this issue and didn't find anyone talking about this error, thus this blog post. I found what I needed in the Adobe ColdFusion 10 install documentation. (When all else fails read the instructions?) The IIS 7.5 feature CGI also need to be enabled. Well hey, it would be nice if the error message mentioned that one too!

It turns out there is already a bug report filed for this and Adobe claims it is fixed. However, the problem does persist because Adobe needs to change the actual file that you download. A "patch" after the fact is pointless when trying to fix an installation bug. And this bug is really just an "Error Message" that is incomplete. Enabling CGI in IIS 7.5 allows you to complete the installation.

I hope this short post saves someone time and hassle.

Installing ColdFusion 10 on OS X Mountain Lion

So Adobe is late to the party again. Months after Apple released OS X 10.8 Adobe announced it would take 3 to 5 more months to get a compatible version of ColdFusion 10 on OSX 10.8. Myself and others have been critical of Adobe on this point and still 3 months later no new word on this from Adobe. I'm sorry Adobe, but to many of us this isn't an acceptable timeline. Until now I have not had the ability to just experiment and see if I could get it working properly. I use my primary computer (an iMac) for work. I didn't have time to to Adobe's job.

Now I have a shinny new out of the box MacBook Pro that is fresh and clean and ready for experimentation. Little did it know it was doomed to be a lab rat.

Unfortunately Apple like Microsoft has been dumbing down their operating systems to match the masses of users. I fear we're losing the education battle, but that is another topic. One of the changes Apple made was to remove Web Sharing from the Sharing section of System Preferences. This is now an OS X Server feature. If you upgraded from OS X Lion you still have this option in Sharing. Apache is still included and if you know what you are doing you can still use Apache. You can use a command line to start and stop Apache or if you want a section in System Preferences to start and stop Apache you can install this http://clickontyler.com/blog/2012/02/web-sharing-mountain-lion/.

[More]

Encryption and Decryption in ColdFusion

A while back I was testing the Encrypt and Decrypt functions of ColdFusion 10 (during the Beta program) and I was running into issues of it failing. I kept getting this error for some of the encryption types "There has been an error while trying to encrypt or decrypt your input string: The input and output encodings are not same.". Upon submitting a bug report we figured out that I did not have the "Java Cryptography Extension" installed on my computer. Doh! After installing that all the encryption and decryption code worked just fine.

One nice side note is that during my testing of these functions I wrote a little CFM script that lets you test all the different encryption and decryption types available to ColdFusion. I believe these are all ColdFusion 9 and up, but I may be wrong. It's been a while and I don't remember. So the point of this blog post is two fold; one, you need the "Java Cryptography Extension" installed and two, the code below provides a very decent example of how to code the encryption and decryption functions in ColdFusion.

So I hereby set this code free into the wind!

view plain print about
1<cfparam name="form.data" default="">
2<cfparam name="form.key" default="">
3<cfparam name="form.encryptType" default="">
4<cfparam name="form.myEncoding" default="">
5
6<html>
7<head>
8    <title>Encrypt Me</title>
9</head>
10<body>
11<form action="encrypt.cfm" method="post">
12    Data to Encrypt:<cfoutput><input type="text" name="data" value="#form.data#" size="40"></cfoutput><br />
13    Encryption Key:<cfoutput><input type="text" name="key" value="#form.key#" size="40"></cfoutput><br />
14    Method:<select name="encryptType" size="1">
15        <option value="CFMX_COMPAT"<cfif form.encryptType eq "CFMX_COMPAT"> selected</cfif>>CFMX_COMPAT</option>
16        <option value="AES"<cfif form.encryptType eq "AES"> selected</cfif>>AES</option>
17        <option value="DES"<cfif form.encryptType eq "DES"> selected</cfif>>DES</option>
18        <option value="DESEDE"<cfif form.encryptType eq "DESEDE"> selected</cfif>>Triple DES</option>
19        <option value="DESX"<cfif form.encryptType eq "DESX"> selected</cfif>>DESX</option>
20        <option value="BLOWFISH"<cfif form.encryptType eq "BLOWFISH"> selected</cfif>>BLOWFISH</option>
21        <option value="RC2"<cfif form.encryptType eq "RC2"> selected</cfif>>RC2</option>
22        <option value="RC4"<cfif form.encryptType eq "RC4"> selected</cfif>>RC4</option>
23        <option value="RC5"<cfif form.encryptType eq "RC5"> selected</cfif>>RC5</option>
24    </select><br />
25     Select the encoding:
26 <select size="1" name="myEncoding">
27 <option value="UU"<cfif form.myEncoding eq "UU"> selected</cfif>>UU</option>
28 <option value="Base64"<cfif form.myEncoding eq "Base64"> selected</cfif>>Base64</option>
29 <option value="Hex"<cfif form.myEncoding eq "Hex"> selected</cfif>>Hex</option>
30 </select><br>
31    <input type="submit" name="submit" value="Encrypt This">
32</form>
33
34<cfscript>
35 if(len(trim(form.data) ) and len( trim(form.encryptType) ) ) {
36
37 try {
38        if (form.encryptType eq "CFMX_COMPAT") {
39            theKey = Form.key;
40        } else {
41            // For all other encryption techniques, generate a secret key.
42
            theKey = generateSecretKey(Form.encryptType);
43        }
44
45        encrypted = encrypt(form.data,theKey,form.encryptType,form.myEncoding);
46
47        decrypted = decrypt(encrypted,theKey,form.encryptType,form.myEncoding);
48
49        writeOutput("<br><br>CODE:<br><br>");
50        writeOutput("encrypted = encrypt(form.data,theKey,form.encryptType,form.myEncoding);<br>");
51        writeOutput("encrypted = encrypt('#form.data#','#theKey#','#form.encryptType#','#form.myEncoding#');<br><br>");
52        writeOutput("decrypted = decrypt(encrypted,theKey,form.encryptType,form.myEncoding);<br>");
53        writeOutput("decrypted = decrypt('#encrypted#','#theKey#','#form.encryptType#','#form.myEncoding#');");
54
55
56    }
57    catch(any e) {
58        writeOutput("generateSecretKey('" & Form.encryptType & "') = " & theKey );
59        writeDump(e);abort;
60    }
61
62    writeOutput("<hr>#form.data# encrypted with #form.encryptType# is: #encrypted#<br /><br>and now to decrypt it again: #decrypted#");
63
64
65    }
66
</cfscript>
67</body>
68</html>

*Note: When I write little tools like this I'm usually writing it because there is something I absolutely need to see in order to complete another project. These little tools are not written as projects themselves and therefore may not be very pretty or as full featured as something that I was writing as a complete project. I just needed to get some code running that gave me back the data I needed to see. There are no warranties or promises. If you find is useful then great. If not, oh well. I know the code works on CF9 at the moment. I can not be certain if it still works on other versions of ColdFusion. * Any code posted may not be totally secure or production ready. Use at your own risk. ** Unless otherwise noted, this code shall be deemed Public Domain.

ColdFusion 10 on OS X Mountain Lion, Eventually

Adobe just announced on September 22, 2012 that they are FINALLY going to support ColdFusion server on OSX again.

The support for ColdFusion 10 on Windows 8 and OSX Mountain Lion is coming. We will be releasing new installers to support these new platforms. While it is not possible to point out the release date for these installers at this time, the installers will be made available in the next 3-5 months time. - Adobe ColdFusion Blog

Seriously?!? In the next 3 to 5 months? You expect me and other OS X users to wait for 3 to 5 months to upgrade our OS to Mountain Lion? That is purely UNACCEPTABLE! Adobe you are trailing the pack again. Something they've gotten used to unless it's their pretty boy flagship product PhotoShop. Back on July 25th Apple released OSX Mountain Lion 10.8. I asked then if Adobe would actually support ColdFusion 10 on Mountain Lion. All I heard was crickets. Remember that Adobe threw in the towel on supporting ColdFusion 9 on OSX Lion 10.7.

By Rakshith - 1:45 PM on November 7, 2011 With our current focus on ColdFusion Zeus, we will not be fixing these issues at this point.

We will not be working towards supporting ColdFusion 9.0.1 on Lion. However, ColdFusion Zeus will be supported on OSX Lion.

ColdFusion 9.0.1 never fully worked on OSX Lion. Adobe first ignored the issue, then blamed us for having installed it wrong, then finally when myself and another blogger forced the issue and proved publicly where the problem was located they relented and admitted there was a problem. Adobe then released a "patch" but never asked those of us that found the problem to test the patch. Thus the patch was only a partial patch and failed. Then Adobe issued the statement above, not as a main entry on their blog but buried DEEP in the comments section in this blog post. Why would Adobe make that announcement like that? To hide the fact from the rest of the world that Adobe just doesn't care about developing for the Mac?

So officially we have not had a fully supported version of ColdFusion (any version) since July 20, 2011. Yes, ColdFusion 10 was released this past May, but seriously almost NO ONE is using it yet. So from Mid may until Mid July of 2012 Adobe can technically claim they supported OSX. That's pretty lame. Apple offeres developers the opportunity to have early access tot he next OS so developers can have their software ready to go on day one of the new OSX. Why is Adobe not doing this? I have no clue! Maybe Adobe should fire the developer team and bring development back to the United States and hire better developers. Again, I don't know. But I do know I am getting tired of Adobe trailing the pack and providing half baked solutions for OSX. Get a clue Adobe, OSX is on the rise! Especially among your customer base.

ColdFusion Job Opening: CF Webtools

CF Webtools just posted a job opening.

CF Webtools is looking for bright, talented, and motivated developers with high skill sets in ColdFusion, .NET and Mobile development (including IOS and Droid).

Adobe ColdFusion 10 Hotfix Installer

With the release of ColdFusion 10 came one new feature WE ALL have been asking Adobe to implement. This feature is the Hotfix installer and notifications. This is in the ColdFusion 10 Administrator under "Server Update" at the bottom of the left hand navigation menu. Yesterday I saw Adobe had released an update to ColdFusion 10. So today I decided to test the new Hotfix Installer. After launching my ColdFusion 10 Administrator I immediately saw in the upper right-hand corner and alert notifying me there was an update ready to download and install. So how does the installer work? During the alpha and beta testing with Adobe I never had a chance to test this feature. None of the alpha or beta updates were released in a way that could use the hot fix installer. So today is the first test I've ever done of Hotfix Installer.

[More]

OS X Mountain Lion Launches Today

According to an article on Mac Rumors Apple is releasing OS X Mountain Lion today! I don't see it in the App Store yet.

I bring this up because of Adobe and their complete inability to bring current software to the latest OS X version. Will ColdFusion 10 run on Mountain Lion? Why would I expect it to? Adobe could not be bothered to get ColdFusion 9 working correctly on OS X Lion. Most of the work I do is for client on ColdFusion 9 and even ColdFusion 8. Thus upgrading my OS to take advantage of new features and software is always held back by Adobe. Will we have to wait for ColdFusion 11 as Adobe told us to wait for ColdFusion 10 if we wanted to run on OS X Lion.

How about ColdFusion Builder? Will this run on OS X Mountain Lion? This OS version has been in the works for a while and was announced many months ago. Yet Adobe is silent about their products.

The Roaring Apps website is doing a great job in getting user reports on what works with Lion and Mountain Lion. Not many Adobe products showing up as working.

Either I give up my Mac or I give up Adobe. Sorry Adobe, you're losing!

Adobe we are waiting for you to do something, anything correctly.

uCertify ACE ColdFusion Exam PrepKit

First, I have to apologize to the fine people at uCertify, they sent me this offer to take the full ACE ColdFusion 9 practice test FOR FREE if I wrote a review. So far I have been remiss in even downloading and starting on the Prep Kit. Sorry UCertify, today I did download the full Prep Kit. Thank you for your patience and polite reminders.

I have received an offer (Back in December of 2011 - my bad for taking so long to get started on this) from uCertify to review their PrepKit and I have accepted that challenge and now I am reviewing Adobe 9A0-127 ColdFusion 9 PrepKit from uCertify. Initially it looks MASSIVE! There are study guides, practice tests additional study materials , progress trackers and more! This looks like everything needed to complete and "ace" the ACE test. As soon as I am done with the full review I will post it for you all. (Let that be soon!)

More Entries