ColdFusion Express is an introductory version of ColdFusion that allows you to use some of the basic ColdFusion functionality. When you need the more advanced ColdFusion features, you can upgrade to ColdFusion Enterprise or ColdFusion Professional.
- Once you log onto the Global Corp. Example Application, the application does not prompt you again for your user name or password. In order to keep the application relatively simple, there is no code to track a session.
- If you are using DateCompare to compare two dates and both dates are exactly the same except that the first date passed is earlier by x seconds, you would expect a return value of -1 if you passed "s" as the 3rd parameter. In fact, it returns 1. (9339).
- Developers should avoid using keywords as variables in their code. Keywords that should not be used are - for - while - do - if - else - switch - case - break - default - in - continue
- Passing numeric data to the ColdFusion IsDate and ParseDateTime functions can yield unexpected results. For example, IsDate may return TRUE for numeric data that are not dates. This may be attributable to the underlying Windows API functions on which these ColdFusion functions are based. This behavior occurs when passing data ColdFusion interprets as numeric. For example, single decimal point numeric data such as "0.1," "21.6667", multiple decimal point numeric data, such as "1.2.3", and comma separated data, such as "0,1" create unexpected results.
To work around this behavior, it is always advisable to only pass string data in a supported format to the IsDate and ParseDateTime functions, or, generate date-time data using the Now or CreateDate functions.
- Only one instance of ColdFusion can be run on any given system at a time.
- The sample application, Global Corp., will not always prompt for a login.
- The NumberFormat function returns **** when used as follows (468): #NumberFormat(1000, "0000")# Apparently, there is no way to always display four digits with leading zeros. The suggested workaround: Add a plus in the mask to force sign printing and then select everything after the sign: Right(NumberFormat(1000, "___+0"), 4)
- Due to a limitation in the Win32 API date formatter, the DateFormat function will not work on dates prior to 1/1/1601. If you try passing a date earlier than this to the ColdFusion DateFormat function you will get the following error (1056): Error Occurred While Processing Request Error Diagnostic Information An error has occurred while processing the expression: DateFormat(date,"mmm dd yyyy") The reason for the error is unknown.
- The _eurodate and the _date form field suffixes for server side validation do not work properly. The problem allows dates like 01/25/1997 in the _eurodate field and dates like 25/01/1997 in the _date field. This is due to the behavior of the Microsoft class that we currently use for date/time parsing.(1173)
- The MOD operator returns an invalid negative number when using large numbers (10 digits). For example, the statement, "#Evaluate(3013228971 MOD 256)#", should return 171 but instead returns -85. This works on some, but not all 10 digit numbers. (2588)
- The CFCASE tag is case-insensitive. This means that VALUE="STEVE" and VALUE="steve" both specify the same switch target and will issue the referenced diagnostic message for duplicate switch targets. This may be an issue for application pages built with beta versions of ColdFusion, when CFSWITCH was case-sensitive. For example, the following code compiled and executed different logic paths for "steve", "STEVE", and "StEvE" in 4.0 beta, but will now issue a diagnostic message about duplicate cases: <CFSWITCH EXPRESSION=#sval#><CFCASE VALUE="STEVE">Found STEVE</CFCASE><CFCASE VALUE="steve">Found steve</CFCASE><CFDEFAULTCASE>Found something: <CFOUTPUT>#sval#</cfoutput></CFDEFAULTCASE></CFSWITCH> All three values, "steve", "STEVE", and "StEvE" now match<CFCASE VALUE="STEVE">.
- Submitting a form from a directory protected with NT challenge/response has been observed to produce the error, "HTTP/1.1 500 Server Error". This did not happen if the directory was using basic authentication. This should no longer occur. This can not be reproduced with NT 4.0/SP4 however. (6714)
- The value of the TEMPLATE attribute of CFINCLUDE doesn't work unless surrounded by quotes. The following form does not work: <CFINCLUDE TEMPLATE=cf40/test.cfm> This form worked in earlier releases but now causes an error. (6790)
- If you experience difficulty opening an Adobe Acrobat file from the ColdFusion Documentation page, just open the file directly in Acrobat Reader from the cfdocs/AcrobatDocs directory. This appears to be a browser-related issue.
- In structures, assignment (a=b) is by reference. For example, if a structure, depts, is created and another structure,
tmp, is assigned to it ( tmp= depts) any changes in depts will be reflected in tmpand vice versa. In effect, tmpbecomes an alias for depts.
When building nested structs, any assignment of a struct as a member of another struct does not make a copy;
insteada reference or pointer is passed. For example, if you use StructInsert(parent,"Member" ,child), parent contains a reference to childas a value with key "Member". Any changes to childwill affect the structure pointed to by parent.Member and vice versa.
If a physical copy is needed, the StructCopy() function can be used. Using the same structure variables as above, if depts is a structure and
tmpis set to the value returned by StructCopy of depts ( tmp= StructCopy(depts)), then tmpwill have its own copy of the key value pairs of depts. Making changes to depts will not affect tmpand vice versa.
- Previous versions of ColdFusion did not allow a template to be included more than once. That is,
recinc. cfmcontains a<cfinclude template=" recinc. cfm"> tag, or a template included by recinc.cfm includes recinc.cfm in a cyclical manner. This restriction has been eliminated in ColdFusion 4.0.1.
Note: Use caution when including a template in a recursive manner, as this type of processing may consume large amounts of system resources.
- When using "Application" as a variable name, always set its scope to avoid errors. For example, a form field called Application should be referenced as Form.Application. This change reflects the new 4.0.1 application structure, in which an application is an object containing all the application variables present.
- ColdFusion now supports only Apache version 1.3.2 and above.
- A Note on the euro
ColdFusion Express supports the euro currency. Two special functions, LSEuroCurrencyFormat() and LSParseEuroCurrency() have been added to CFML for this purpose. The euro currency symbol in a .cfm file will be parsed correctly by the ColdFusion Express Server. For the euro currency symbol to be properly displayed, the system needs to be euro-enabled.
ColdFusion Express has two modes of attribute checking for template processing: strict and relaxed. All native CFML tags are associated with an XML description of their attribute types and the combinations of attributes that are allowed. For backward compatibility, the default processing attribute validation mode in 4.0.1 will be relaxed checking.
It is important to remember that the code validator inspects all code before execution begins. You will run problems if you spread the opening and closing of a tag across conditional branches.
Here are some specifics on syntax checking:
- All tags must be strictly nested in ColdFusion Express. The following code example is no longer valid: <CFIF "1" EQ "1"><CFLOOP> . . .</CFIF><CFIF "1" EQ "1"></CFLOOP></CFIF>
- The validation of CFDEFAULTCASE is rigorous; CFDEFAULTCASE must be the last tag on its level (that is, the last child of a CFSWITCH).
- Attribute names that are a combination of literal strings and variable names must be enclosed in double quotes. The following code will pass in ColdFusion 3.1.1 but will throw an error in ColdFusion Express: <CFQUERY NAME=Get#variablename# DATASOURCE="Datasource">
The correct syntax is:<CFQUERY NAME="Get#variablename#" DATASOURCE="Datatsource">
- In ColdFusion Express, all invalid tag nesting and missing required end tags produce errors.
- The CFSET, CFIF, and CFELSEIF tags have no attributes but do take additional input. You will get an error message if the required input is not provided. For CFSET, the message reads:
"Attribute set validation error in tag CFSET
The tag has an invalid attribute combination:
The following required attributes have not been provided: (INSIDETEXT)." INSIDETEXT is the "internal" attribute for these tags.
- When attribute combinations are not checked using strict validation, any combination of irrelevant attributes can be provided together with correctly formed combinations of relevant attributes. For any tag action there may be a set of required attributes and a set of optional attributes that make sense only for the particular action.
- Previous versions of ColdFusion sometimes allowed invalid CFML syntax in blocks of code that were not executed. This led to very subtle bugs that were difficult to track down and fix. ColdFusion Express correctly validates syntax, even in blocks of code that never get executed, such as those inside <CFIF false> ...</CFIF>.
- Some tags in ColdFusion 3.x allowed the presence of superfluous attributes. In ColdFusion Express, superfluous attributes will generate errors even when strict attribute checking is disabled. A later test release will correct this situation.
- ColdFusion Express catches errors such as the unbalanced '#'s' in the "NAME" variable reference below and throws an "Invalid parser construct found" message: <CFSET NAME="xyz"><CFOUTPUT> The directory 'name#' was not deleted.</CFOUTPUT>
- Duplicate attributes will generate a "bad attribute" error message.
- In previous versions of CF, the mathematical operation included in the following code would be processed: <cfoutput>#variables.start-5#</cfoutput> This type of syntax now halts processing of the template and generate an error message.
We recommend that you enable strict checking unless you absolutely need existing templates to run with the conditions described above. If this is the case, you should plan to clean up existing templates at as soon as you can.
To enable strict validation, open the ColdFusion Administrator Server page and check the "Enable Strict Attribute Validation" box.
Run cfmlsyntaxcheck.cfm to run the checker. The application pages are installed in the web_root\cfdocs directory.
As a side note to this, there is a possibility that any commercially purchased custom tag that you are using may result in a syntax error due to stricter syntax checking. If a commercially purchased custom tag fails to run under ColdFusion Express, you should first turn off the "Enforce Strict Attribute Validation" setting in the ColdFusion Administrator. If the tag continues to generate errors, you should contact the tag's vendor in that it may require a correction to invalid syntax in order to run under ColdFusion Express.
In previous versions, ColdFusion used a "two-pass" attribute value evaluation method. Consider the use of single and double quotes in expressions embedded in strings, such as
<CFSET ANATTRIB="foo of five is: #foo("5")#">
This says, evaluate foo("5") and embed the resulting value inside the string "foo of ... ". Note that the double quotes inside the #s are not "escaped". This is the expected behavior since the expression we want to evaluate is 'foo("5")' and not 'foo(""5"")'. In ColdFusion 4.0.1 this can be written as
<CFSOMETAG ANATTRIB="Foo of five is: #foo("5")#">
CFSOMETAG ANATTRIB="foo" will have the same value as CFSET ANATTRIB="foo". This shows that expression evaluation syntax is the same inside attribute values as it is in CFIF, CFELSEIF, CFSET, and other tags. However, the snippet above will not run under previous versions of ColdFusion because of the two step evaluation of attribute values. First, all escaped quotes were unescaped, regardless of their position with respect to expressions. The resulting string was then evaluated. Since the double quotes around 5 are not escaped, the above snippet would throw an error in previous versions of ColdFusion. The "backward compatible" syntax is:
<CFSOMETAG ANATTRIB="foo of five is: #foo(""5"")#">
ColdFusion Server for Windows supports Apache version 1.3.6 with the module shipped with ColdFusion. For information about support for earlier releases of Apache Web Server, please visit the ColdFusion Support page. To obtain Apache free of charge, go to the Apache group web site at www.apache.org.
The ColdFusion Module can be found in the installation directory (usually c:\cfusion\bin).
We assume below that your Apache installation is found inc:\Apache.