This page should contain all the
information you'll need to run a CGI script on BestWeb's server.
Please note that BestWeb does not provide technical assistance
on the setup, troubleshooting, or operation of CGI scripts.
Any non-system related problem will fall under our standard
consulting fee ($75.00 per hour).

Basic Settings

Perl (version 5)

/usr/local/bin/perl

Perl (version 4)

/usr/local/bin/perl4

sh (shell)

/bin/sh

sendmail

/usr/sbin/sendmail

New as of 07/30/2001:

Please note, the following changes have been made:

All files in your website that are viewable to the public reside
on ftp.bestweb.net.

Files on shell.bestweb.net are not public.

Changes made in files on shell.bestweb.net will not be seen
by the public.

Changes made in files on shell.bestweb.net will only be useful for
testing purposes.

ftp.bestweb.net is only able to be accessed through an ftp
client.

BestWeb will not move files from shell.bestweb.net to ftp.bestweb.net
or vice versa. You will need to do that.

This means a few things. Whereas shell.bestweb.net was formerly used to set the proper permissions for
CGI scripts, that must now be done in your FTP client while logged into ftp.bestweb.net. Changing
permissions for files in shell.bestweb.net will have no effect on those files in your website. It will
only be useful for testing if your programs work.

General
Guidelines

Make sure all your scripts end in .cgi

Make sure the permissions are set correctly for both the script
and the directory using the command chmod 755 [script] from
your shell.

Make sure the first line of your script points to the Perl interpreter
using the syntax #!/usr/local/bin/perl

If you encounter an Internal Server Error try running the
script from your shell to see what errors exist. Make sure to include
a './' in front of the script name.

Make sure to save your scripts in UNIX format. Many Windows or Macintosh
editors will insert ^M control characters after each line causing
the script not to work.

You need to make sure the script ends
with a ".cgi" extension. Other extensions, like ".html" or ".pl" won't
work.

You also need to make sure the permissions
are correct. The script will not execute correctly unless the script
is executable by all and only writeable by yourself. Nor will it work
if the directory is writeable by either group or other.

Permissions can now be set with your
ftp client in ftp.bestweb.net. If you would like a shell account to
test your CGI scripts, you can e-mail systems@bestweb.net and you
will be set up with shell access in a business day.

First, make sure that the permissions
on your script are set correctly. See question #3 for details.

Another possibility is that your script
is not correctly outputting a "Content-type" header. The first thing
your script prints out needs to be a line like this:

Content-Type: text/html

Followed by a blank line. If your script
doesn't print this, you will see the server error.

Perhaps your script is *supposed* to
print out the "Content-type" header, but an error is preventing it
from working correctly. You can try running your script from the command
line in the UNIX shell to verify that the script is printing correct
information.

This usually happens because the #!
line at the start of your script is incorrect. The correct locations
for various programs are listed in question #9 below.

If the location looks correct, it's
possible that the script has a strange character at the end of the
line that is confusing UNIX. Make sure you upload your file in ASCII
(text) mode rather than binary mode. This strips off the strange characters
and helps UNIX out.