Migrating a Web Server to IIS 5.0

Previous Topic Next Topic

Converting UNIX Application Files

There are many differences between UNIX and Windows file descriptors and conventions. Those pertinent to migrating a Web application to IIS 5.0 are listed in the following table. To avoid application errors, you must make the necessary changes so your UNIX files adhere to Windows conventions.

Table 3.9   Necessary Changes to UNIX Application Files


Feature

UNIX Implementation
Change to This Windows Implementation
Directory separator Forward slash (/). Backslash (\). Note that Perl uses the backslash as an escape code, so in Perl scripts you’ll want to replace the forward slashes (/) in paths (pathnames) with double backslashes (\\). Or you can use non-interpolating single quote strings to indicate there are no special characters in the string.
File names and pathnames See the earlier discussion in Converting UNIX File Names and Pathnames.  
Directory hierarchy The UNIX file system appears to be a single directory hierarchy. Windows storage is divided into a number of physical or virtual disk drives with a directory hierarchy on each. To access a file on Windows, you must know what disk drive the file is on and specify the drive letter (C, D, E, and so forth) as part of the file path (pathname).
Text file line termination UNIX uses only a line feed character to flag an end of a line in text files. Text file lines should be terminated by a line feed and a carriage return. Some applications require both line feed and carriage return terminations to work correctly.
File descriptors/handles UNIX file descriptors 0, 1, and 2 represent stdin, stdout, and stderr, respectively. Win32 uses handles rather than descriptors, and you can’t assume that they’re fixed as you can in UNIX. Use the Win32 API call, GetStdHandle(), to ascertain which handles are being used.


© 1997-1999 Microsoft Corporation. All rights reserved.