Making Sure That You Have CGI Access

If you’re going to use CGI with your Web pages, you have to make sure that you have the capability to do so. This sounds obvious, of course, but you may or may not have CGI access for your Web site. CGI access means that you can run programs on your Web server that use the Common Gateway Interface, a method of sending form data from a Web page to an external program for processing.

Nine times out of ten, these programs are kept in a subfolder called cgi-bin, so your first step is to look to see if you have such a subfolder on your server. If you do, odds are that you have CGI access, because that subfolder doesn’t have any other purpose. If it’s there, go ahead and try to use a CGI program. If you follow all the instructions carefully and the program still doesn’t work, you may need to have a talk with your network administrator or ISP.

Why your ISP won’t help

When your Web site is hosted by the same ISP that you get your Internet access from, you’ll probably find that it’s not too supportive of your desire to run CGI scripts. There are a couple of reasons for this, which make good sense to your ISP but don’t help you at all:

Badly written programs using CGI can represent a security hazard, poking holes in the normal running of things. Because ISPs want everything to run smoothly and under their control instead of someone else’s, ISPs tend to frown on this possibility.
Most ISPs don’t really care about your Web site. They’re not bad people, ...

Get Building a Web Site For Dummies®, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.