Accessibility

TechNote (Archived)

Migrating ColdFusion applications from Windows to UNIX

UNIX Operating Systems are case sensitive

UNIX is case-sensitive, Windows is not. When your template is named index.cfm on the UNIX file system but your CFML code refers to it by the name index.CFM, UNIX will not be able to find the file and you will get an error.

Creating HTML and CFML Templates on a UNIX Computer

Use vi, emacs, textedit or any other UNIX application to create your templates on the local UNIX computer. You can also use Dreamweaver, HomeSite or ColdFusion Studio to do remote development from a Windows computer anywhere on the net. If your editor has the option for saving templates in Unix format, select the option, as it will help prevent blank lines appearing between the lines of code in your template.

Moving Templates from Windows to UNIX

Use FTP to transfer the templates, or you can use the Save Remote Copy option of HomeSite or ColdFusion Studio. You could also use Samba, a shareware utility. This application will let you access a UNIX file system on an NT network so that it looks like an NT mapped drive. You can then edit your templates with whichever Windows tool you prefer and save them to the mapped drive on the UNIX box. This technique works great with HomeSite and ColdFusion Studio.

Drive Mappings are different in UNIX than in Windows/DOS

There are no drive letter designations in UNIX, such as C:\. The file system references all directories relative to a root directory which is referred to by a single forward slash character/. For example, on Windows, ColdFusion is normally installed in the C:\cfusion directory. On UNIX based operating systems, it is normally installed in a directory named /opt/coldfusion.

Cross-Platform Development Techniques

If you need to deploy applications on both the Windows and UNIX platforms, we suggest you use the application framework, as described in the documentation. Create anApplication.cfm template (it must be spelled exactly like this, with a capital A). Within that template you will create application variables which will check which operating system the server is running under and set your directories and drive mappings accordingly.

 <CFIF Server.OS.Name is "UNIX"><!--- !!! SYBASE or ORACLE ---><CFSET DBMS = "SYBASE"><CFSET DSEPAR = "/"><CFELSE><!--- !!! MS_ACCESS or MS_SQL_SERVER ---><CFSET DBMS = "MS_ACCESS"><CFSET DSEPAR = "\"></CFIF> 

Here is the list of ColdFusion Server Variables and possible values:

Server.ColdFusion.ProductName - Stores the ColdFusion product name, for example, ColdFusion Server.
Server.ColdFusion.ProductVersion - Stores ColdFusion product release information, for example, 6,0,0,58500.
Server.ColdFusion.ProductLevel - Stores ColdFusion product level information, for example, Professional.
Server.OS.Name - Stores the server operating system name, for example, UNIX or Windows NT.
Server.OS.AdditionalInformation - Stores information about the host operating system, for example, Service Pack 3 or SUNOS.
Server.OS.Version - Stores the operating system version, for example, 4.0.
Server.OS.BuildNumber - Stores the build number of the host operating system, for example, 1381 or Generic.

For more information about ColdFusion variables, see the Using ColdFusion Variables section in Developing ColdFusion MX Applications with CFML.

ODBC Database Connectivity

Microsoft Access data sources are not supported in the UNIX versions. Microsoft SQL Server data sources are not supported in the Unix versions prior to ColdFusion 4.5.1. See the Edition Comparison Overview for information about the databases supported on the UNIX Platforms.

TechNote Articles

The ColdFusion Support Center contains many TechNotes regarding UNIX-specific issues. Please see the Related TechNotes section at the end of this article for a sampling of those TechNotes.

What is not supported in the UNIX versions
  • Crystal Reports (cfreport) is not supported in ColdFusion for UNIX
  • COM/DCOM will not work in the UNIX environment
  • Advanced Security is not available on Linux (versions 4.5.x and 5)
  • Verity vspider is not available on Linux (versions 5 and MX)
  • Indexing Adobe Acrobat (.pdf) files is not available on Linux (versions 4.5.1-MX)
  • cfgraph is not available on HP-UX (version 5)
CFX Support

Custom tags will need to be recompiled with either the GCC or Sun C++ compiler, or your UNIX C++ compiler.

Additional Information


Related TechNotes:


AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support

Document Details

ID:tn_17098
Browser:Chrome
Internet Explorer
Netscape
Opera
Safari
Firefox
Database:DB2
Informix
MySQL
Oracle
SQL Server
Sybase
MS Access

Products Affected: