What is CGI?
CGI stands for Common Gateway Interface. It
represents a set of rules that describe how a Web Server communicates
with another piece of software on the same machine, and how the other
piece of software (the "CGI program") talks to the web server. Perl and
shell scripts are small programs which carry out useful tasks on the
server, such as processing the contents of a form on your web page.
This is a technically complex issue that, once
understood, will stand you in good stead. You may need to call for
basic help (on 0207 565 1700) if you are not familiar with CGI.
Your Virtual Internet (UNIX, 2003 server) web space
is fully CGI enabled. Any perl or shell scripts that you have can be
uploaded to the "cgi-bin" (if applicable) directory on UNIX sites.
Here are the paths to some of the more common programs needed by cgi scripts:
Path to perl: #!/usr/bin/perl
Path to hit counter: /cgi-bin/Count.cgi
Path to form mail: /cgi-bin/formmail.pl
Path to send mail: /usr/lib/sendmail
Please note that the path to mail form needs to be in lowercase.
We have provided some handy CGI scripts in the /cgi-bin directory that are ready for you to use:
You will get more information on these on http://www.vi.net/tech/
What scripts should I use?
If you are unsure which scripts you need or are ready to look for more adventurous scripts, see below:
A good resource for CGI scripts are found at www.worldwidemart.com and www.cgi-resources.com
With all CGI scripts they should be uploaded into
the cgi-local directory as this is the only directory with executable
permissions. It should be FTP'ed in ASCII mode as opposed to the
default binary mode. Also the permissions should be set to the specific
requirements of the script through your FTP client. This is usually
755. If you wish to know more about permissions a good resource is www.perl.com and specifically www.lies.com/begperl/
How do I change Permissions?
Creating Executable Permissions(WS FTP Pro)
Connect to your site via FTP
Right click on the script in the cgi-bin which needs executable permissions
Go to Chmod Unix
Click to a 755 formation
That is all three on the top row. The first in the second row. All three in the third row
Click Change Permissions
Executable Permissions (Cute FTP)
Connect to the site via Quick Connect
Go to Commands.....Advanced Commands.......Change File Attributes
Your script will now have been made executable
Doing an nslookup:
Go to Start in the bottom left of your PC
Select Programs
Then look at the accessories
Choose msdos command prompt
On the screen type:
nslookup www.yourdomain.com (press enter)
you will get a reply like this:
C:>nslookup www.whichhost.com
Server: melchitt.office.vi.net
Address: 192.168.1.251
Non-authoritative answer:
Name: websvr-1.tele.vi.net
Address: 194.164.95.33
Aliases: www.whichhost.com
This shows that the domain www.whichhost.com is on the server websvr-1.tele.vi.net
If you would like to know more about VI's servers do another search under 'Server Paths'.