CGI
Questions
  1. What is CGI?
  2. Do you allow CGI to run on your servers?
  3. What is the correct path to perl?
  4. What is the path to sendmail?
  5. What is the exact physical path to my root directory on the webserver?
  6. Why doesn't my CGI work?


Answers
  1. What is CGI?
    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. See our Resources section for links to CGI sites.
    [Back to top]

  2. Do you allow CGI to run on your servers?
    We do allow running of cgi scripts on the servers, 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.
    [Back to top]

  3. What is the correct path to perl?
    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
    [Back to top]

  4. What is the path to sendmail?
    Another program that needs to be specified in many scripts is sendmail. This is located at:

    /usr/lib/sendmail
    [Back to top]

  5. What is the exact physical path to my root directory on the webserver?
    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
    [Back to top]

  6. Why doesn't my CGI work?
    Make sure when you upload the CGI file DO NOT upload in binary mode, instead use ASCII mode. 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 the scripts into your cgi-bin directory for security reasons, however they will execute from anywhere within your account.

    The last step is to set the file permissions. This is otherwise known as chmoding and can be done from most FTP clients. For specifics on chmoding you can refer to our "chmoding files" help section.

    Check, double check and triple check the paths in all the CGI script configuration files.

    If you used a word processor to edit the scripts, be sure that it was saved as a plain text file with the same file extention as the script started with. For example, an MS Word ".DOC" file will not execute as a CGI script.
    [Back to top]



- Home - Design - Hosting - Resources - Support - Order -
- Privacy - Security - Policies - Contact - Support -

Design and Content © ForwardWeb 1997 -
All Rights Reserved