Chapter One - General Account Information
Chapter Two - Control Panel
Chapter Three - FTP Instructions
Chapter Four - Telnet Instructions
Chapter Five - POP3 Email Settings
Chapter Six - Mail Server
Chapter Seven - Microsoft FrontPage
Chapter Eight - Anonymous FTP
Chapter Nine - Site Statistics
Chapter Ten - Password Protect Dirs

Chapter Eleven - CGI-Bin
Chapter Twelve - Secure Socket Layer (SSL)
Chapter Thirteen - Changing Passwords
Chapter Fourteen - SubDomains
Chapter Fifteen - PreInstalled Scripts
Chapter Sixteen - MySQL
Chapter Seventeen - Faqs
Chapter Eighteen - PHP/SSI
Chapter Nineteen - Real Audio/Real Video
Chapter Twenty - Policy & Disclaimer

CHAPTER ELEVEN - CGI BIN

CGI-bin Applications

CGI stands for "Common Gateway Interface," a fancy name meaning computer programs running on the web server that can be invoked from a www page at the browser. The "bin" part alludes to the binary executables that result from compiled or assembled programs. It is a bit misleading because cgi's can also be Unix shell scripts or interpreted languages like Perl. CGI scripts need to be saved in ASCII format and uploaded to your server's cgi-bin in ASCII or text format. This is very important.

CGI, Common Gateway Interface, includes programs that run on the server to enhance the quality and functionality of a web site.    There are many resources on-line that allow the downloading of free cgi scripts.  

( For instance:  http://www.worldwidemart.com/scripts/ )
or ( http://cgi.resourceindex.com/Programs_and_Scripts/ )

We do allow running of cgi scripts on the server, however they must conform to our acceptable server resource usage policy. If we deem that a script is using an excessive amount of server resources, it will be disabled.  We do offer shell access to our servers for debugging or creating scripts-  you will need Telnet access.    We highly recommend that you setup Linux as a second operating system on your own workstation, as the more you familiarize yourself with this operating system, the better it will perform for you.  As often as possible, however, our web servers should be used only to upload the fully debugged final version of a cgi script so performance and uptime for other customers on the server is not compromised.

To keep our hosting prices as low as possible we do not keep a programmer on staff who can debug or install scripts for you. However we can refer you to a 3rd party programmer that can provide you that service for a fee if you need it. 

We have provided below some general information that will find helpful when installing cgi scripts.

Before a cgi script will work certain modifications must be made to them.  Certain paths must be specified in some scripts.    After the "#" in the first line of the perl script, the path to perl must be specified.  /usr/bin/perl should suffice for this path.  Below is a printout of a "whereis perl" from our system.

perl: /usr/bin/perl

Other common paths sometime needed for cgi scripts:
Send Mail - /usr/lib/sendmail
Date -
/bin/date

Also, often you will need to know the exact physical path to your root directory on the webserver your account exists upon.  On our newer Linux servers, the path to your root directory is:
/home/username/

Obviously, substitute "username" with the login you were assigned when you first received your account details.  Also, keep in mind that when you configure your CGI, that your /public_html is included in your path.  For instance, if you have a guestbook.pl script in your /cgi-bin, the exact physical path to that file is:
/home/username/public_html/cgi-bin/guestbook.pl

The documentation of your program should tell you what lines that you need to changed in order to get your script up and running.

When you have all your modifications made you will want to save the file as a .pl or .cgi file.  (Make sure to use a plain text format.)  When you upload the file DO NOT upload in binary mode, instead using ASCII.    Uploading in binary will cause the server not to recognize the scripts as executables.  Most FTP clients will upload .pl or .cgi files in binary mode by default so you will need to change this.  You will need to upload your scripts into your cgi-bin.

Setting Permissions

You can very easily change permission on your files in the File Manager option in your control panel.

 

©Copyright 1998 AMS. All Rights Reserved.
The entire contents of this site is copyrighted and may not be reproduced for any purpose without prior written permission.

Please contact the Webmaster for AMS with comments or broken link information on this site.