![]() |
![]() |
|
|
||
With alternatives available, why CGI? Ah, glad you asked! Number one reason is that CGI is a technology proven to work with every browser and all major server operating systems. CGI does not make browsers crash. And CGI requires no special plug-ins. That means you don't have to worry about whether or not it can work. Of course it can work. If it doesn't, it's not the CGI protocol at fault. Rather, it would be the CGI program or its installation. And because of CGI's popularity, it's easy to find answers or get professional help when a program doesn't work or the installation is amiss. Let's back up a step and mention that CGI is not a programming language. Rather, it is a method or protocol, something that serves as an interface or gateway between the browser and a program on the server. The browser asks for information and the program provides it. The program itself can be written with Perl, C++, or most any other language the server understands. For more about how CGI works, see the "How CGI Works" article linked from http://willmaster.com/possibilities/archives/ With CGI, you can have shopping carts, forms, database driven sites, visitor tracking, interactive server maintenance, info retrieved from remote web pages, databases updated on remote servers, and so much more. Peruse CGI script download sites to gain a preliminary understanding of what's available for use with CGI. It's CGI that makes most interactive, automated sites work as smoothly as they do. Alternate technologies, such as ASP, PHP, and ColdFusion, do some of the same things CGI does. Some alternates work better on one server and might not work on others. ASP and ColdFusion were developed for NT, for example. Both now work on some UNIX servers, but not on all. PHP is popular from sheer force of merit. It is relatively easy to learn and is excellent with database query languages such as MySQL. However, these are newcomers compared to CGI. And none of them have as many free and complete scripts available for immediate download. CGI solutions are more available for UNIX/Linux servers than for NT. If you're looking for a hosting account with CGI, that can be a major consideration. Without CGI, you must either depend on alternate technologies or forego much of your site's potential for user interactivity and automation. Shopping for a Hosting Account Your hosting account must allow you to install your own CGI programs. Ensure that you not only have CGI access but that you have complete control over your own cgi-bin. (It is called "cgi-bin" because, traditionally, CGI programs reside in a directory named "cgi-bin" -- however, the directory can be named anything allowable by the server.) Mere CGI access can mean, to some hosting companies, that you can use their authorized programs in the cgi-bin but you may not install your own without prior permission. Ensure your account has its own cgi-bin and that you have complete control over it. Because Perl is the most popular language used for CGI programs, another consideration is the availability of Perl modules. A Perl module is a piece of program code designed to do specific functions and is installed on a server for use by all of that server's hosting accounts. For example, LWP::Simple is a popular module that allows Perl programs to retrieve web pages from remote servers. Your hosting company should have that installed and ready for your Perl program's use. Most hosting companies are happy to install popular Perl modules when their accounts require them. New Perl modules are written all the time and no hosting company can be expected to have all of them installed as soon as they are released. However, the current popular modules should already be installed and the hosting company should be willing to install new modules as they become available and their hosting accounts ask for them. Once you have a server with your own cgi-bin, you can use the free Master Pre-Installation Tester from http://willmaster.com/a/9/pl.pl?pit to check whether or not specific modules are installed on your server. Some Perl CGI programs require certain modules, without which they simply won't run. (More Master Series CGI programs are available at http://willmaster.com/a/9/pl.pl?cgi) If you haven't noticed by now, I like CGI :-) Copyright 2001 William Bontrager
| ||