(page requirements)

CGI? What is it? Can I do CGI?

If you've ever looked for a way to add a counter to your web page you probably read about CGI scripts. But are you still wondering what it is?
 
What does CGI stand for?
 
C.G.I. stands for Common Gateway Interface.
 
What does Common Gateway Interface mean?
 
Technically speaking, CGI is a standard for external gateway programs to interface with information servers such as web servers.
 
In other words, at least as Internet web servers goes, CGI is a standard to follow when writing programs that run inside web servers. Since the Internet consists of many different types of computer hardware and software, CGI standard helps programmers to write programs that are compatible with different web servers.
 
A CGI script or a program is then a program that runs inside a web server.
 
How can CGI help me?
 
Most of the web pages you see on the Internet are static. Meaning, once you create and publish an HTML page, its content doesn't change until the next time you edit it. Yes, there are some exceptions to this, but generally speaking HTML and most other Internet related pages are static.
 
Using CGI scripts is one of the ways to add dynamic content or interactive functions to your static web pages.
 
Web page counters, search engines, slide shows and order forms are samples of what you can use CGI programs for. CGI is not the only way you can do such things, but it is the most commonly used method because it's been around for longer than newer technologies such as JavaScript and Dynamic HTML. Also, since CGI programs run on the web server itself, you don't have to worry about the type of browser or the type of computer your visitors are using. Your visitors will only see the input and/or output of the CGI program, without seeing or worrying about what goes on in-between.
 
So, can I use CGI?
 
That depends on the type of web server you're using and the level of access you have.
 
If you run your own web server, most likely you can use CGI scripts.
 
If you're renting web space on your Internet/web service provider's server, you may or may not be able to use CGI programs. You simply have to refer to their documentation or ask them to find out.
 
Some web space providers will give you access to a limited number of CGI scripts that they have already installed on the server, but they may not let you use other CGI programs on their server. Also, most free web space provides do not provide CGI access, but contact them to be sure. They may provide CGI access for a fee.
 
I found out that I have CGI access on my server. Can I install any CGI program now?
 
Probably, yes.
 
The steps required to install CGI programs vary from server to server and also from provider to provider. Sometimes it's a matter of simply uploading the CGI program to a specific directory on your web server. Some servers may require several steps such as installing a script interpreter, creating a special directory to store CGI programs, modify certain program settings and make the programs executable.
 
Is it hard to install CGI programs?
 
It depends on the type of web server you're using, the type of operating system it's running on and how your service provider has configured their server. Don't hesitate to try installing CGI programs. It could be as easy as uploading the CGI program to your web server -- a 5 minute job, or it could require some specific steps taking a couple of hours, depending on how your web server is configured. You won't know until you try.
 
How can I learn how to install CGI programs on my server?
 
First read the documentation for the CGI program that you're interested in installing. If that doesn't work, also read the documentation provided by your web space provider on how to install CGI programs on their server. Remember that the steps on how to install CGI programs depends on how your provider has configured the web server.
 
I'm unable to install CGI programs for some reason. What do I do?
 
If you don't have CGI access or unable to install CGI programs for some reason, there's still hope.
 
You maybe able to find a client-side solution such as a JavaScript, Java applet, ActiveX control or browser plug-in that can perform the same function as the CGI program you were looking at. Although some of your visitors may not have the capability to view such client-side components, this percentage of users with old browsers is decreasing. Note that only some of the CGI programs can be implemented as client-side components. Programs requiring a way to store data at a central location (usually on a web server), such as counters and guest books, are best implemented with a CGI or similar backend.
 
On the other hand, there are many free and paid services that will let you use CGI scripts installed on their servers, sometimes called hosted services. They may require you to display an advertisement or add a link to their site in exchange of letting you use their programs, but this maybe the final option you have.
 
Do you have any tips before I start to install CGI programs for the first time?
 
  • Make sure that you have CGI access on your web server. Don't guess. You don't want to spend hours only to find out that your web server doesn't really give you CGI access.
     
  • Read the minimum requirements of the program you're trying to install. Not all programs are going to work on your web server.
     
  • Contact your web space provider. They should be able go give you step-by-step instructions on how to install CGI programs on their server. These instructions maybe slightly different than the instructions provided by the CGI program author, specially if your web server doesn't use "standard CGI installation steps."
     
  • Be patient. Unlike programs you install on your personal computer such as word processors, games, etc., CGI programs usually do not have a user-friendly interface. These types of programs are usually console-mode programs which runs behind-the-scenes, so you won't always know what's going on until the installation is completed.
     
  • Try again. If it doesn't work the first time around, get some sleep and try again. Start from the beginning and make sure that you're following the exact steps.
     
 
At the end of the day, you'll be glad you took the time to learn how to install CGI programs, because there are so many great CGI programs that can enhance your web pages. Another thing to remember is that you do not want to lose your data. Look into online backup to keep all computer work you do safe.
 
 
 
Applicable Keywords : Common Gateway Interface, HTML, Mini Tutorial, Web Resource, World Wide Web
 
 
 
Copyright © 2009 Chami.com. All Rights Reserved. | Advertise | Created in HTML Kit editor