• Knowledge Base: CGI-Scripts


    1. Formmail Instructions
    2. Do you offer PGP?
    3. What is the path to perl and sendmail?
    4. How do I add Java to my server?
    5. How can I run CGIs from any directory?
    6. Can I run CGI scripts from any directory?
    7. How do I install Mailreader?
    8. Freeware CGI-script basic guide.
    9. Where do I upload my CGI-Scripts?

    1. Formmail Instructions - Top

    This script is one from Matt's Script Archive which we have installed and preconfigured for your domain. FormMail is a generic www form to e-mail gateway, which will parse the results of any form and send them to the specified user. This script has many formatting and functional options, most of which can be specified through the form. This means you don’t need any programming knowledge, nor do you need multiple scripts for multiple forms. This also makes FormMail the perfect system wide solution for allowing users form-based user feedback capabilities without the risks of allowing freedom of CGI access.

    There is only one form field that you must have in your form, for FormMail to work correctly. This is the recipient field. Other hidden configuration fields can also be used to enhance the operation of FormMail on your site.
    The action of your form needs to point towards this script, and the method must be POST in capital letters. Here's an example of the form fields to put in your form:







    Recipient Field
    Description:. This form field allows you to specify to whom your form results will be mailed Most likely you will want to configure this option as a hidden form field with a value equal to that of your email address.
    Syntax:

    Subject Field
    Description: The subject field will allow you to specify the subject that you wish to appear in the email that is sent to you after the form has been filled out. If you do not have this option turned on, then the script will default to a message subject: "WWW Form Submission".
    Syntax: If you wish to choose what the subject is:

    To allow the user to choose a subject:


    Email Field
    Description: This form field will allow the user to specify their return email address. If you want to be able to return e-mail to your user, it is strongly suggested that you include this form. This will be put into
    the From: field of the message you receive. If you want to require an email address with valid syntax, add this field name to the 'required' field.
    Syntax:

    Realname Field
    Description: The realname form field will allow the user to input their real name. This field is useful for identification purposes and will also be put into the From: line of your message header.
    Syntax:

    Redirect Field
    Description: If you wish to redirect the user to a different URL, rather than having them see the default response to the fill-out form, you can use this hidden variable to send them to a pre-made HTML page.
    Syntax: To choose the URL they will end up at:

    To allow them to specify a URL they wish to travel to once the form is filled out:


    Required Field
    Description: You can require certain fields in your form to be filled in before the user can successfully submit the form. Simply place all field names that you want to be mandatory into this field, separated by commas. If the required fields are not filled in, the user will be notified of what they need to fill in, and a link back to the form they just submitted will be provided.
    To use a customized error page, see 'missing_fields_redirect'
    Syntax: If you want to require that they fill in the email and phone fields in your form, so that you can reach them once you have received the mail, use the syntax like:


    - Updated: September 25, 2001

    2. Do you offer PGP? - Top

    Yes. PGP which runs from commandline is offered as a unsupported service. Logged in as root user run client_tools, select menu 4 for script installs than PGP commandline as the option.

    - Updated: August 3, 2001

    3. What is the path to perl and sendmail? - Top



    perl /usr/bin/perl
    sendmail /usr/sbin/sendmail


    - Updated: May 16, 2001

    4. How do I add Java to my server? - Top

    We can add JDK 1.1.8 to Your server environment. Just email sales to make the request. Please keep in mind before making the request that this will require 41 megs of space.

    - Updated: March 15, 2001

    5. How can I run CGIs from any directory? - Top

    To enable CGI scripts for all your web directories, you need to edit the configuration file for Apache:

    1. Enable the Handler type for ".cgi" files:

    In /etc/httpd/conf/httpd.conf make sure the line "AddHandler cgi-script .cgi" is uncommented, if it isn't already.

    2. Enable ExecCGI:

    In httpd.conf, make sure your main web directory has ExecCGI enabled. All the sub-directories under it will inherit the properties of the parent directories unless you specifically disallow it (via .htaccess files, for example).

    So you want the ... entry for /home/httpd/html (or wherever your DocumentRoot is) to include "ExecCGI" in the "Options" list.

    For example:


    Options Indexes FollowSymLinks ExecCGI

    (other directives...)



    You may also opt to use "Options All", which enables all the available options. You can refer to the Apache docs
    http://www.apache.org/docs/mod/core.html#options for more details on the Options directive.

    3. Restart your Apache web server, to apply the changes.

    - Updated: March 15, 2001

    6. Can I run CGI scripts from any directory? - Top

    No. By default the server is set-up so CGI scripts will only run from the cgi-bin directory. You can however make changes to your Apache config to activate this on all domains. Since there are security issues involved, we suggest you use a .htaccess file in the main HTML directory on only the domains that require this, using the following entries:

    AddType application/x-httpd-cgi .cgi
    Options ExecCGI


    - Updated: March 15, 2001

    7. How do I install Mailreader? - Top

    Mailreader Setup

    1. Log into the system as root user.
    2. Type client_tools [hit return]
    3. Select #4 for mailreader
    4. Enter domain to add mailreader to.


    - Updated: April 25, 2001

    8. Freeware CGI-script basic guide. - Top

    Script Installs
    The Web Control panel allows you to install several scripts, below find browser paths to the Authors instructions that our installed for you with the installation. The scripts will be active within 10 minutes of submission.

    • *VBPRO Guestbook http://yourdomain-here.com/vbpro/docs
    • Forums http://yourdomain-here.com/forums/cgi-s/
    • Thats an Order http://yourdomain-here.com/lto.htm
    • Free For all Links - (Freeware)
      http://yourdomain-here.com/links/manual.htm
    • Whois - (Freeware) http://yourdomain-here.com/cgi-bin/whois.cgi
    • Graphic Counter - (freeware) http://yourdomain-here.com/counter/
    • Postcards - (freeware) http://yourdomain-here.com/cards
    • pollit - (freeware) add polling to your site.
      http://yourdomain-here.com/pollit
    • Quiz Master - (freeware) http://yourdomain-here.com/quiz
    • SFE Power search-(freeware) http://yourdomain-here.com/search/instruct.htm
    • PhpMyAdmin -(freeware) http://yourdomainname-here.com/phpmyadmin. Requires the file /phpmyadmin/config.inc.php3 be configured for your DB.
      Docs located at http://yourdomainname-here.com/phpmyadmin/documentation.html



    * VBPRo by default has the email options disabled at program level.

    Note:
    All freeware scripts are made available in working order when installed from webcontrol, we cannot offer help in customizing or trouble shooting scripts you choose to change. If you should decide to try to change default settings and than the script becomes non functional just submit a reinstall from webcontrol to set it back as new.

    - Updated: April 27, 2001

    9. Where do I upload my CGI-Scripts? - Top

    You should upload your CGI-Scripts to the CGI-Bin directory.
    CGI-Bin: /home/userid/webscripts

    Please note: Your userid is the username you chose when you signed up for your account.

    - Updated: March 15, 2001

    [e-Mail me the FAQs]    -     [Search our FAQs]