ColdFusion 8.0.1 gotchas - CFExecute

I recently upgraded our CF 8 server to CF 8.0.1 plus the cumulative hotfix 1. I'm blogging threw a couple issues we ran into that I thought may help others.

CFExecute

The CFExecute tag changed, but according to the docs, all that was changed was to add two new attributes: errorFile and errorVariable. Unfortunately this change caused a side effect to some code I was use. We had code like this:

<cfsavecontent variable="exResult"><cfoutput>
<cfexecute
name="/path/to/executable"
arguments="-some arguments"
timeout="30"
>

</cfexecute>
</cfoutput></cfsavecontent>

This would capture the standard output of the executable's results in the exResult variable. This has worked for years across multiple versions of ColdFusion. CF 8.0.1 broke it. After the update, the exResult variable was blank. No errors, just no data. After much head scratching, the fix was to get rid of the cfsavecontent tag and use the variable attribute:

<cfexecute
name="/path/to/executable"
arguments="-some arguments"
timeout="30"
variable="exResult"
>

Apparently the variable attribute has been around since CF MX 6.1, but somehow our code never was updated to use it. Well, it is apparently required now.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Thanks for posting this info. I encountered the same problem a week or so ago and didn't have time to work it out. Your post reminded me of the outstanding problem and it was resolved in a few minutes after reading this.
# Posted By Todd Mathews | 7/19/08 12:38 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.8.