Ian Winter Ian Winter

ColdFusion 8.0.1

The latest update to ColdFusion has been released in the form of 8.0.1 which will let you have a painless install on Leopard and on 64 bit OS'

Full details on the Adobe site.

A lot of other tweaks and bug fixes as well including new FCKEditor and changes to the attributeCollection stuff.

ColdFusion Leap Year Fun

So just an update on this. I sent off some emails to folks at Adobe and have had acknowledgment but as yet no reply. I'll you know if and when I get something back.

Coldfusion possible Leap Year bug

My colleague noticed that as of midnight GMT one of our applications at work broke. After some digging it looks like a CF leap year bug.

<cfset attributes.minage = 18>
<cfoutput>
#now()#<br />
#attributes.minage#<br />
#dateadd("yyyy", -(attributes.minage), now())#<br>
#datediff("yyyy", dateadd("yyyy", -(attributes.minage), now()), now())#<br />
#datediff("yyyy", dateadd("yyyy", -(attributes.minage), now()), DateAdd("d", 1, now()))#
</cfoutput>

The code was run on CF 7.0.1, 7.0.2 & 8.0.0 on Windows and Linux, all produce same results.

Not sure for definite it's a bug, but, it's always worked until today, in theory it might work again tomorrow as well. Last leap year of course was CF6 so may not have shown up.

Yay for dateDiff()... :|

Update

A more detailed example. It only effects the 28/2. Other dates fine suggesting more that it's leap year related.

<cfoutput>
	<cfset variables.datea = createDate(2008,02,3)>
	<cfloop from="2008" to="1990" step="-1" index="variables.y">
		<cfset variables.dateb = createDate(variables.y,02,3)>
		<cfset variables.diff = datediff("yyyy", variables.datea, variables.dateb)>
		#variables.datea# - #variables.dateb# = #variables.diff#<br />
	</cfloop>
</cfoutput>

And it's output....

{ts '2008-02-28 00:00:00'} - {ts '2008-02-28 00:00:00'} = 0
{ts '2008-02-28 00:00:00'} - {ts '2007-02-28 00:00:00'} = 0
{ts '2008-02-28 00:00:00'} - {ts '2006-02-28 00:00:00'} = -1
{ts '2008-02-28 00:00:00'} - {ts '2005-02-28 00:00:00'} = -2
{ts '2008-02-28 00:00:00'} - {ts '2004-02-28 00:00:00'} = -4
{ts '2008-02-28 00:00:00'} - {ts '2003-02-28 00:00:00'} = -4
{ts '2008-02-28 00:00:00'} - {ts '2002-02-28 00:00:00'} = -5
{ts '2008-02-28 00:00:00'} - {ts '2001-02-28 00:00:00'} = -6
{ts '2008-02-28 00:00:00'} - {ts '2000-02-28 00:00:00'} = -8
{ts '2008-02-28 00:00:00'} - {ts '1999-02-28 00:00:00'} = -8
{ts '2008-02-28 00:00:00'} - {ts '1998-02-28 00:00:00'} = -9
{ts '2008-02-28 00:00:00'} - {ts '1997-02-28 00:00:00'} = -10
{ts '2008-02-28 00:00:00'} - {ts '1996-02-28 00:00:00'} = -12
{ts '2008-02-28 00:00:00'} - {ts '1995-02-28 00:00:00'} = -12
{ts '2008-02-28 00:00:00'} - {ts '1994-02-28 00:00:00'} = -13
{ts '2008-02-28 00:00:00'} - {ts '1993-02-28 00:00:00'} = -14
{ts '2008-02-28 00:00:00'} - {ts '1992-02-28 00:00:00'} = -16
{ts '2008-02-28 00:00:00'} - {ts '1991-02-28 00:00:00'} = -16
{ts '2008-02-28 00:00:00'} - {ts '1990-02-28 00:00:00'} = -17

ColdFusion Leopard & 64 bit hints

Looks like Adobe could be announcing support for ColdFusion on Leopard and 64bit (other than Solaris) soon (hopefully). [via forta.com]

ColdFusion 9

So late the blog as ever, but off the back of MAX ColdFusion 9 has been announced with the codename "Centaur". Adobe run about 2 year product cycles so I suspect it'll be 2009.

Launch date 09/09/09?

Coldfusion 8 (Scorpio) Beta

It's all over the blogsphere, but, I'll join in anway. If you get yourself over to the Adobe Prerelease site you can apply for the Coldfusion 8 Beta.

Adobe's New Icons

Adobe's new product icon's have been making quite a few waves in the blogsphere and to be honest I can see why.

Initial reaction has to be that it's based on the Periodic table, perhaps the designer is a science buff? Letters in boxes may be web2.0, but, it's product identification and branding, I can't help think that a little more thought should have gone into it. Then again, I'm no graphics designer, but, I'm not sure I'd have signed it off!

Recompile Apache 1.3.x connector

If you're running Apache 1.3.x and Coldfusion 7 you might have had errors when starting apache about needing to compile it using DEAPI.

[warn] Loaded DSO /opt/coldfusionmx/runtime/lib/wsconfig/1/mod_jrun.so uses
plain Apache 1.3 API, this module might crash under EAPI!
(please recompile it with -DEAPI).

The original Adobe technote 18748 worked with CF6 as I've followed it before, but, with CF7 once compile and you try and start apache you get a crazy hex error, like this:

Cannot load /opt/coldfusionmx7/runtime/servers/lib/wsconfig/1/mod_jrun.so into
server: /opt/coldfusionmx7/runtime/servers/lib/wsconfig/1/mod_jrun.so: undefined symbol: hexstrtol

A quick google found this site with a script on how to do it. Now one note on the guide is he's building a mod_jrun20.so file for apache 2, quick vi to change them all to mod_jrun.so and you're all good.

So, big thanks to that guy for posting his script. Mine is included below for reference.

#!/bin/bash
export CFMX=/opt/coldfusionmx7
export APACHE_PATH=/usr/local/apache
export APACHE_BIN=$APACHE_PATH/bin

#CFMX connector path eg $CFMX/runtime/lib/wsconfig/1
export CFMX_CONNECTOR=$CFMX/lib/wsconfig/1

#stop apache
$APACHE_BIN/apachectl stop

${APACHE_BIN}/apxs -c -Wc,-w -n jrun -S LIBEXECDIR=${CFMX_CONNECTOR} mod_jrun.c \
jrun_maptable_impl.c jrun_property.c jrun_session.c platform.c \
jrun_utils.c jrun_mutex.c jrun_proxy.c jrun_ssl.c

${APACHE_BIN}/apxs -i -n jrun -S LIBEXECDIR=${CFMX_CONNECTOR} mod_jrun.la

strip $CFMX_CONNECTOR/mod_jrun.so

Mine did error saying:

apxs:Error: file mod_jrun.la is not a DSO

but it all works.

ColdFusion structure Bug

Found a new bug today in Coldfusion 7. Basically if you create structure via arguments and try to use it later you'll notice some funky behaviour and the meta information about the structure is incorrect. Code test case is included.

<cfscript>
function struct() { return arguments; } </cfscript>

<cfset s = struct(arg1="blahblah", arg2="cont", arg3="act")>

<cfoutput>
<h3>#s.getClass()#</h3>
length: #structcount(s)# (#structkeylist(s)#)<br>
<cfset structdelete(s, 'arg1')>
length: #structcount(s)# (#structkeylist(s)#)<br>
<cfset structdelete(s, 'arg2')>
length: #structcount(s)# (#structkeylist(s)#) </cfoutput>

<cfset s = structnew()>
<cfset s['arg1'] = "blahblah">
<cfset s['arg2'] = "cont">
<cfset s['arg3'] = "act">

<cfoutput>
<h3>#s.getClass()#</h3>
length: #structcount(s)# (#structkeylist(s)#)<br>
<cfset structdelete(s, 'arg1')>
length: #structcount(s)# (#structkeylist(s)#)<br>
<cfset structdelete(s, 'arg2')>
length: #structcount(s)# (#structkeylist(s)#) </cfoutput>

feed-squirrel.com

New Adobe / Macromedia feed aggregator just popped up online. This one is nice and simple with a good search, it has the most updated feeds out and about in the Coldfusion, Flex & Flash world.

Go on, feed the squirrel!

feed-squirrel.com - Home

Powered by BlogCFC, 5.9.002. Contact Me

All comments, view, rants, raves and opinions are mine and mine alone.

del.icio.us Digg Flickr Last.fm LinkedIn Pownce Twitter YouTube