"Build database-driven sites without coding, Try Drumbeat."


BUILDER.COM

Search for articles on BUILDER.COM:

 
 
 
 
 
 
 
 
 
 
The abc's of CGI - back to intro Hosting Issues
 
If you're writing CGIs for your intranet or for your own servers, then the only real issue is Perl. You need to make sure Perl is on your machine, and you need to know the correct path to include in your code.

But if you're writing CGIs for your Web site, the first question to ask is whether your Internet service provider (ISP) will let you run CGI scripts at all. There are many reasons why an ISP might hesitate to host your CGI scripts. If the program is not written to perform efficiently, it may run out of control and crash the server. Most ISPs use the same machine to host many accounts, so if one script goes bad, everyone suffers. Also, if your application receives a lot of hits, it could cause performance problems for everyone else using that server. But the biggest fear is security. There are many ways that a poorly written CGI can compromise the security of a system--for instance, by allowing site visitors to run their own commands on the server.

what is CGI?
when to use CGI
hosting issues
how to:
process a form
use cookies to personalize Web pages
use cookies with server-side includes
create a simple guest book
add a page-visit counter
troubleshooting
Even if an ISP agrees to host your CGI applications, it may ask to review your programs before giving you permission to run them. This shouldn't be a problem if you're moving an existing script or if you have a completely tested app ready to go. But this may not be the ideal situation if you plan on developing your own CGIs on the ISP's server.

In contrast, many Web builders don't want to write their own CGI scripts, but want to do things that only a CGI can provide. Many ISPs have thought of this and keep a collection of popular CGI programs, such as email form handlers, on their servers. Anyone hosting a site on those servers has permission to run these scripts. If you need basic server-side applications only, look for an ISP that offers the CGI capabilities you want.

Unfortunately, many ISPs don't allow CGIs of any kind on their servers. Finding an accommodating carrier may turn out to be harder than learning CGI.

when to use CGI how to: process a form


 


"Build database-driven sites without coding, Try Drumbeat."

Back to top  Go to the BUILDER.COM home page.

  Copyright © 1995-98 CNET, Inc. All rights reserved. Privacy policy.