What is CGI?
CGI stands for common gateway interface. In simplest terms, CGI is a method for the server to transfer information from a Web site to the server and back to the Web site to make your content interactive. CGI can be written in different languages, the most common one being Perl. Guestbooks, polls, e-mail forms and forums can be made interactive with this interface.
How do I install CGI scripts?
Configure your script
After you've found a script you'll need to configure it. If you don't already have one you can find some great scripts in many different categories at The CGI Resource Index
or Hot Scripts
. The following are the variables you'll most likely have to change. Please refer also to the read me file that comes with your script:
Install your script
- Path to perl interpreter. Most often your path will be one of the following two examples:
You may need to contact your host to find out your path to perl. I use Dreamhost Web hosting, all of the information needed is published in a "knowledge base" to make it easier to install scripts. Check with your host to see if they have something similar.
- Path to root directory. This is the path, not the URL to your root directory. An example of this is:
The path to your cgi-bin might look like this:
Contacting your host is the best way to find out what the path to your root directory is.
- Path to sendmail. The path to sendmail often looks like this, of course please check first with your Web host:
Upload your script to your cgi-bin, or wherever your host requires you to upload it to. Please check the read me file carefully, most of the instructions you'll need will be there. Make sure that you upload your files in the ASCII mode, or your script will not work.
Set file permissions
After everything is uploaded, you will have to set the permissions (CHMOD) of some of the files you uploaded. The following is a CHMOD chart that explains a little bit about how you can set the permissions:
In order to set the permissions, you find the file in your ftp program, highlight it, right click on it, and depending on your FTP program, choose CHMOD or you may have to choose FTP and then CHMOD. In newer versions of WS FTP Pro you need to right click the file, choose properties and then chmod from there. A screen will pop up that looks much like the above one. If they ask you to set the permissions to "755" then you would choose read, write, execute in the owner group, read and execute in group, and read and execute in other.
Your script should be working properly. The instructions in the read me file included with your script will usually give you directions on how to further configure and test the script.
- Error 403 (permission denied). This means that you didn't set your file permissions (CHMOD) properly.
- Error 500 (internal server error). Something's wrong with your installation, unfortunately it doesn't tell you what is wrong.
Well good luck! I usually can't get the script to work on the first or second try. Sometimes I can NEVER get it to work, so I try a different script until I find one that I can install properly. Sometimes the scripts come with self-installation, which is wonderful
, but it's rare to find scripts like that.
If you can't install your own cgi-script, you can hire someone to do it for you. I can install most scripts, but when it came to my links script, it was impossible for me to figure out. I found someone who installs scripts at a very reasonable price. His name is Tim Mousel
, he's honest, and incredibly fast AND he has good taste in colors ;) My script was installed within 3 hours after I contacted him. If you can't do it yourself, consider contacting him.
Copyright 1997-2016 Lissa, All rights reserved