Differences between ColdFusion 5 and ColdFusion 7

The process of moving applications from ColdFusion 5 or earlier releases (ColdFusion 4.5, ColdFusion 4, etc.) to ColdFusion 7 is complicated because ColdFusion 5 to ColdFusion 7 is not a compatible upgrade. ColdFusion 5 was built relying on C++ while Adobe changed ColdFusion 7 to no longer use C++ but to rely on Java instead.

You can migrate your ColdFusion applications from ColdFusion 5 to ColdFusion 7. However, please remember, unlike the valid upgrade paths available for moving from ColdFusion MX 6.x to MX 7.x, migrating from ColdFusion 5 to ColdFusion 7 does not allow for automated migration of your ColdFusion settings. All information regarding data sources, mappings, custom tag paths, and others must be migrated from ColdFusion 5 manually.

Known Differences in ColdFusion 5 and ColdFusion 7

Product Area Compatibility Issue

Double-byte character storage in SQL Server

Storing double-byte data in an SQL Server database that is not setup in Unicode in nchar, nvarchar, or ntext data types, you will need to convert your data to Unicode encoding.
Error variables In CF 7, the cferror variable structure has changed. cfdump of the error variables (<cfdump var=#error#>), will show a single-level array in ColdFusion 5, ColdFusion 7 shows a multilevel array. To access individual error variables in ColdFusion 7, you must use additional array values. In ColdFusion 7 you can use <cfdump> to see all of the values.
Variables with more than 3 dots in name In ColdFusion 5 you could have a variable with more than 3 dots in its name similar to this example:<cfset a.b.c.d.e = “foo”> <cfoutput> “#a.b.c.d.e#” </cfoutput> In ColdFusion 7 these variables will fail and provide the error:Element B.C.D.E is undefined in A The error happens because the new structure in CF 7 auto-creation functionality fails to create structures that are more than 3 levels deep. In CF 7 any variable with less than or equal to 3 dots in its name should work without issue.
Binary values In ColdFusion 7, binary strings are represented as byte arrays, allowing you to manipulate them using standard CFML array logic. This is different from ColdFusion 5 where binary values are immutable.
Columns with the same name In ColdFusion, when two columns that have the same name is returned from the database, the column choice selected for the result inside ColdFusion is undefined. Theoretically, the results provided by ColdFusion are random, however, in practice, you can predict the column selection in earlier versions of ColdFusion 5. In ColdFusion 7 you can no longer rely on a predictable range of identically-named columns; instead, you will have to use column aliases to remove all uncertainty.
Duplicate URL parameters ColdFusion 7 handles duplicate URL parameters differently than ColdFusion 5. In ColdFusion 5, you had the ability to call Test.cfm?a=1&a=2 returns the value a=2 for the URL. Inside ColdFusion 7, the same call will return the value a=1,2.
Reserved words in ColdFusion MX Currently in ColdFusion 7, you can create a variable with the same name as a scope. The variable is only visible if the Variables scope prefix is used explicitly. If a variable is not used, you will receive an error. However, scope names are reserved in ColdFusion 7, but Macromedia recommends that you do not use a scope name as the variable name. Also, if you are attempting to run a Query of Queries, you can no longer use SQL reserved words as a variable or as a column names unless you are using brackets []; for example, SELECT [count] FROM MYTABLE.
Scheduler data Inside CF 5, all scheduler information is stored in the registry. Every registry key contain a name without spaces (EndDate). In ColdFusion 7, all scheduler information is stored in an XML file. Another change involves the registry keys. All compound variable names are separated using underscores (End_Date). Remember that this will only affect applications that use the scheduler information in the CF 5 registry.
Use operating system logging facilities option in the ColdFusion Administrator Inside the ColdFusion Administrator panel you no longer have an option to Use operating system logging facilities, because ColdFusion 7 always uses the Windows logging services.
Verity searches If you added cfusion\bin or cfusion\verity\_nti40\bin to your system path for ColdFusion 5, it would have to be removed before upgrading to ColdFusion 7 for it to find the correct Verity DLL files.
Literal values in COM methods In ColdFusion 5, you had the ability to use a literal value when calling a Component Object Model (COM) method. ColdFusion 7 has a stricter rule on how variables can be passed to COM objects, and no longer support literal value. Instead, now CF 7 uses a method argument that is passed by reference, forcing you to use a variable as the argument in your code.
Japanese version, sort functions The ability to sort functions such as ListSort() and ArraySort() return items in a slightly different order in ColdFusion 7 than they do in ColdFusion 5. CF 7 now sorts characters by their Unicode char number, instead of CF 5 which sorts characters by their shift_jis char name.
LSIsDate() Inside ColdFusion 7, LsIsDate(“3-1-2002″) returns No, whereas in CF 5 it will return Yes. The LSIsDate function only accepts the hyphen character (-) as a date delimiter in the Dutch(Standard) and Portuguese(Standard) locales.
DateFormat(),TimeFormat()LSDateFormat(),LSTimeFormat() If an invalid mask is passed through one or more of these functions, the function outputs the invalid characters in CF 5 and CF 7. However, CF 5 delimits each character of the output with an apostrophe (‘) character.
ParameterExists() ParameterExists() is deprecated in ColdFusion 7 you will have to use IsDefined() instead.
cfdirectory When action=list is used, the cfdirectory will only report the ReadOnly and Hidden attributes. If additional information is needed it is recommended to use cfexecute.
cfheader Gaining access to your status code header for a page that used the cfheader statusCodeattribute, you will have to use<cfdump var=”#cfhttp#”> or <cfdump var=”#cfhttp.statuscode#”>.Do not use<cfdump var=”#cfhttp.responseheader#”>.
cfloop

The cfloop tag no longer returns struct keys in alphabetical order as it did in ColdFusion 5. ColdFusion 7 returns struct keys in no particular order.

Upgrading to ColdFusion 7

In 2005, Adobe understanding the massive change in their ColdFusion software, created a 60-page white paper called Migrating Applications to ColdFusion MX 7 to assist users in making the move to MX 7.

Please be aware that if you decide not to work through the Adobe migration resource guide, your website will not function on ColdFusion 7 and will appear down or broken.

Was this article helpful?

Yes (1)
No (0)

We're sorry you didn't find this article very helpful. Please help us improve it by leaving your feedback below.

Error