RKLhost.com Support Services

Welcome to RKLhost.com

 
CGI Help

What is CGI?
Do you allow CGI to run on your servers?
Whats the correct path to perl?
What is the path to send mail?
What is the exact physical path to your root directory on the webserver?
Why doesn't my CGI work?

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.

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

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.

Whats 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

What is the path to send mail?
Another program that needs to be specified in many scripts is sendmail. This is located at /usr/lib/sendmail

What is the exact physical path to your 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

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.