Make ColdFusion on Ubuntu case-insensitive Make ColdFusion on Ubuntu case-insensitive apache apache

Make ColdFusion on Ubuntu case-insensitive


I did some research, and this is what I came up with...

Creating Custom Tags (help.adobe.com)

Note: Although tag names in ColdFusion pages are not case sensitive, custom tag filenames must be lowercase on UNIX.

cfinvoke Documentation (help.adobe.com)

On UNIX systems, ColdFusion searches first for a file with a name that matches the specified component name, but is all lower case. If it does not find the file, it looks for a file name that matches the component name exactly, with the identical character casing.

Since <cfinvoke> is a standard tag, the tag itself is case-insensitive. However, it sounds like all component argument(s) to <cfinvoke> need to have a lower-case filenames in order for calls with irregular casing to succeed consistently. I know you said refactoring is difficult, but this is what I've come up with:

If you have a folder where you specifically keep components, it's trivial to run a shell script in that folder that renames them all to have lower-casing (remove -i if you don't want to be asked if you're sure each time):

for filename in *.cfc; do  lowercase =`echo $filename | tr '[:upper:]' '[:lower:]'`  mv -i $filename $lowercasedone

If you don't have the components all in the same folder, try it from the top directory.

Let me know if you were able to give this a shot!