Web Server Compatibility

Let's start with the Web since it seems to be getting the most press lately. Web servers are relatively simple. They take text files (HTML files) and transfer them using the HTTP protocol. These text files tell the Internet browser how to display a page and where to download the graphics, sounds, programs, and other files needed to render the page. The three most popular Web servers are Apache, Internet Information Server (IIS), and Netscape, which together make up about 85% of the server market. Apache is a free, open source Web server that, although there is a Windows version available, is run primarily on UNIX platforms such as Linux. IIS is included with Windows NT and 2000 Server and is available only for Windows. Netscape is available in versions for Windows and most flavors of UNIX, including Linux.

Since most Web standards are set by the Internet Engineering Task Force (IETF), Web servers tend to look the same to end-users. The two main problems of compatibility tend to be in connecting to databases and generating dynamic Web pages. Most large Internet sites today store their data in a database and use this data to generate Web pages on the fly. For information on interoperability between Linux- and Windows- based databases, see Chapter 7.

The traditional way of creating dynamic Web pages is to write CGI scripts. Today, there are several programs that make generating dynamic Web pages easier. Two of the most popular of these tools are PHP and Active Server Pages (ASP). PHP is an open source program designed to run with UNIX and Apache. ASP is a Microsoft product designed to run with Windows and IIS. Both of these programs are available in both UNIX and Windows versions.

Both the Linux and Windows versions of PHP are available at http://www.php.net/. They are available in both source code and binary versions. The Windows binaries are up-to-date, but if you want the latest Linux code, you may have to compile it yourself.

There are some special considerations when connecting PHP to a Microsoft database. On a Windows machine, simply use the ODBC drivers. If you need instructions on setting up ODBC, go to http://www.php.net/manual/config-odbc.html.

It is a little more complicated on a Linux machine. To connect to a Microsoft SQL server, use the PHP Sybase modules at http://www.php.net/extra/ctlib-linux-elf.tar.gz. SQL Server and Sybase are mostly protocol-compatible.

It's not simple to connect to a Microsoft Access database from a Linux machine either. The easiest and most robust method would be to use Open Database Connectivity (ODBC) drivers. See the section in the databases chapter (Chapter 7) on ODBC for information on using ODBC with Linux.

Was this article helpful?

0 0

Post a comment