Can I set up CGI scripts
on BestWeb's server?
What do I need to do to make the script work?
Permissions? How do I set those?
I used to change the permissions of my CGI scripts
in shell.bestweb.net, but that doesn't work anymore. How do I do it
now?
I try to access my script and my browser tells me
"Method Not Supported. Why?
I try to access my script and I get a Server Error.
Why?
How do I execute the script to test it?
I try to execute the script and I get "command not
found".
I need the location for certain programs on your server.
What are they?
I don't know how to write a CGI script. Can you guys
help me?
Can I run Server Side Includes?
Can
I set up CGI scripts on BestWeb's server?
Yes you can. BestWeb allows our users
to place CGI scripts within their HTML directory.
What
do I need to do to make the script 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.
I
used to change the permissions of my CGI scripts in shell.bestweb.net,
but that doesn't work anymore. How do I do it now?
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.
Permissions?
How do I set those?
In Windows, in the WS_FTP ftp client,
you can right click on a file and choose 'chmod (UNIX)'. This will
bring a window up where you can change all of the appropriate permissions.
I
try to access my script and my browser tells me "Method Not Supported.
Why?
You need to make sure that the filename
ends with ".cgi".
I
try to access my script and I get a Server Error. Why?
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.
How
do I execute the script to test it?
Telnet to shell.bestweb.net and use
the following commands:
- cd public_html
- ./(name of your script).cgi
While you are in the shell, you can use
the following command:
- pico (name of your script).cgi
to edit the script. Once you are done
testing and editing, type:
- exit
to exit the UNIX prompt.
I
try to execute the script and I get "command not found".
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.
I
need the location for certain programs on your server. What are they?
I
don't know how to write a CGI script. Can you guys help me?
BestWeb does not provide assistance
with CGI scripts for standard dial-up accounts. If you would like
us to write or correct your scripts, we can help you at our consulting
rate ($75 / hour).
You can however find a useful reference
guide at http://web.fwi.com/quadzilla/links/cfm/cgilinks.cfm
Can
I run Server Side Includes?
Yes. All you need to do is have your
web page file name end in .shtml instead of .html, and use the proper
SSI syntax to load the script (<!--#exec cgi="yourscript.cgi"-->)