Corpex - The Business Internet Company Wed 23 July 2008
GENERAL UNIX NT
 
TECHNICAL SUPPORT

General Support

Unix Support

NT Support

HOME GENERAL UNIX NT CONTACT US
  Common Gateway Interface

CGI allows a visitor to your website to interact directly with the server, a way of running a program for them. This might allow for data to be saved into a file, or for a page counter to run.

We support CGI scripts in many languages, including perl, PHP, python, C, shell, bash, csh.

Whatever the source of your CGI script, use ftp to upload them to the www/cgi directory. They can then be executed using /cgi/scriptname. A cgi script must have the correct extension, i.e. the extension must be .pl .cgi .exe or .sh or it will not be executed. You will also need to chmod the file to set it as an executable.

Forms to Email Gateways - mailform.cgi

You should already find mailform.cgi installed in your cgi directory. If you do not have it then please download it and upload it back to your cgi directory, changing the file extension to .cgi. (Please don't forget to make the file executable with the chmod command, and make sure you upload using the ASCII or TEXT mode)

Within your forms page you will need several lines that control the gateway

Required Fields:

<form method=post action="/cgi/mailform.cgi">
<INPUT TYPE="hidden" NAME="mailformToEmail" VALUE="Email@domainanme.co.uk">

Optional:

<INPUT TYPE="hidden" NAME="mailformCc" VALUE="Email@domainname.co.uk">
<INPUT TYPE="hidden" NAME="mailformBcc" VALUE="Email@domainname.co.uk">
<INPUT TYPE="hidden" NAME="mailformURL" VALUE="http://www.domainname.co.uk/reply.htm">
<INPUT TYPE="hidden" NAME="mailformToName" VALUE="Email Recievers Name">
<INPUT TYPE="hidden" NAME="mailformSubject" VALUE="Email Subject">
<INPUT TYPE="hidden" NAME="mailformOrder" VALUE="space separated list of fields used in the rest of the form">

<INPUT TYPE="text" NAME="mailformFromEmail">
<INPUT TYPE="text" NAME="mailformFromName">

The above hidden fields all control 'sub'-functions of the cgi script that provide you with greatest flexibility.

mailformCc allows for a Carbon-Copy of the data to be sent to a desired Email address

mailformBcc allows for a Blind Carbon-Copy of the data to be sent to a desired Email address

mailformURL allows you to specify a web address of a page to return when the script has completed.

mailformToName is the Name of the Email account the mail is being sent to.

mailformSubject is the Subject of the Email.

mailformFromName is the Name of the Email account the mail apparently comes from.

mailformOrder This is a powerful function that allows you to specify the order in which the data is returned to you.

If left blank, the script will return the data in the order it recieved it from the browser. If a field is omitted, then it is ignored. Essentially just add the name="XX" entries to this field. All the entries must be single words, and are space separated

To finish the whole procedure you need a Submit button and optionally a Reset or Clear button. To achieve this use something like the following:

<INPUT TYPE=SUBMIT VALUE="Submit Data">
<INPUT TYPE=RESET VALUE="Clear Form">

Trouble Shooting CGI Scripts

If you are having problems with a Perl script, try the following checklist :

1. Make sure the first line of the script reads: #!/usr/local/bin/perl
2. Have you uploaded the script as ASCII text (not binary or auto-detect)?
3. Have you changed the permissions on the file (chmod 755 FILENAME)?
4. Ensure the first line of the script is not a blank one.
5. Telnet to the server and run the Perl error checker using the syntax: perl -cw NAMEOFSCRIPT

If you are still having problems then please do not hesitate to contact Corpex Support, either email support@corpex.com or phone 0845 050 1898 and ask for technical support.

FIND & PURCHASE A DOMAIN NAME...
  
Please enter search without extension
e.g. 'domain' NOT 'domain.co.uk'
ENQUIRY FORM | CONTACT US
© 1996 - 2007 Corpex Ltd.
Corpex - The Business Internet Company
Visit Corpex Germany: