User Manual

Part 6

Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7


 
CGI-bin Applications
Where to Put CGI-bin Scripts
Paths to Date, Mail, Perl, etc.
Setting Permissions
Troubleshooting CGI-bin Problems

CGI-bin Applications

CGI stands for "Common Gateway Inferface," a fancy name meaning computer programs running on the webserver 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.

We don't provide free support for CGI scripts which we did not install on your server. So if you are not already familiar with CGI scripting, you may want to read a book on the subject or find places on the Internet with CGI scripting information. There are many good resources for CGI scripts found on the web. The scripts at Matt's Script Archive found at http://www.worldwidemart.com/scripts are very good. Many of our scripts come from here. Another excellent resource is The CGI Resource Index found at http://www.cgi-perl.com/ -- if you are not an expert, look for scripts that are very well documented and come with step-by-step instructions, or contact us for help or installation.


Where to Put CGI-bin Scripts

Put your cgi-bin scripts in the www subdirectory named "cgi-bin".


Paths to Date, Mail, Perl, etc.

Here are your paths to the common server resources that CGI scripts often require:

Sendmail: /usr/sbin/sendmail
Perl5: /usr/bin/perl
Date: /bin/date
Java: /usr/bin/java
Python: /usr/bin/python
Domain path: /usr/home/user name
Domain path: /usr/home/user name/cgi-bin

 


Setting Permissions

File Permissions can be set by using an FTP program such as CuteFTP or WSFTPpro

Examples of using chmod:

 PEOPLE  PERMISSIONS
 u = the file's user (you)  r = read access
 g = the file's group  x = execute access
 o = others  w = write access
 a = the user, the group, and others  

 

Some scripts will tell you to chmod 775 (for example). Refer to the documentation of your FTP program for details on chaning file permissions.


Troubleshooting CGI-bin Problems

Below are solutions to some of the more common CGI script problems, in question and answer format.

When I activate my CGI program, I get back a page that says "Internal Server Error. The server encountered an internal error or misconfiguration and was unable to complete your request."

This is generally caused by a problem within the script.

Check the configuration options on your script.

Make sure the permissions are set to 755

I am being told "File Not Found," or "No Such File or Directory."

Upload your Perl or CGI script in ASCII mode, not binary mode.

I am getting the message "POST not implemented."

You are probably using the wrong reference for cgiemail. Use the reference /cgi-bin/cgiemail/mail.txt. Another possibility is that you are pointing to a cgi-bin script that you have not put in your cgi-bin directory. In general, this message really means that the web server is not recognizing the cgi-bin script you are calling as a program. It thinks it is a regular text file.

It's saying I don't have permission to access /

This error message means that you are missing your index.htm file. Note that files that start with a "." are hidden files. To see them, type ls -al. If you wish to FTP this file in, go to the home/yourdomain directory.



[ Virtual Hosting ] [ Adult Virtual Hosting ] [ Dedicated Servers ]
[
Home ] [ Hosting Manual ] [ Policies ] [ FAQ ] [ Contact ]


COPYRIGHT © 1998, ASE INTERNET, INCORPORATED