Online Chat
 Call Us: 
1-877-744-1221
Browse Submit a Ticket
 
Advanced Search
Tools
Rss Categories

Basic Configuration File

Author: Antony Corsten Reference Number: AA-00370 Views: 3683 Last Updated: 07/24/2009 07:29 AM 0 Rating/ Voters

Basic Configuration File

Basic configuration file for the Form Processor Pro 4.1 is called formprocessorpro.cfg. It must be located in the same folder where Perl or PHP executable resides (formprocessorpro.pl or formprocessorpro.php). This file sets basic variables to make Form Processor Pro 4.1 work correctly. You can disable certain variables by putting '#' in the beginning of the line with variable. All symbols put after '#' are not treated as data and are mostly used as comments.

Variables are listed below:

base_path
Specifies relative or absolute server path to the folder where your forms are placed in. If you have multiple forms in multiple directories, you must specify base_path in each start page of the form (see section FPP Configuration / Form Configuration). If omitted, base_path is the directory where FPP executable resides.

Examples:

base_path = ../form1/ #GOOD, relative path
base_path = /usr/local/form1/ #GOOD, absolute path on Unix
base_path = c:/wwwroot/data/form1/ # GOOD, absolute path on Windows
base_path = http://www.site.org/form1/ #BAD: Path is not an Internet link (URL)!

mail_cmd
Sets the command to send mail via command line mailer. It is the most common way to use this variable to send mail from your web form. In most cases, you should leave it's value unchanged.

mail_server
Sets SMTP server for network delivery method. Is an alternative method for sending e-mails from your web form and is commonly used on Windows servers. By commenting this line, mail is being sent using mail_cmd parameters. Default value for mail_server is localhost.

mail_format
Defines format for outgoing email messages. May accept values: html or plain. Default is plain.

Referers
Multiple values. Sets those sites and pages you want to be able to use the Form Processor Pro 4.1 executable. All others will be denied access. You can be very specific on whether only one page has access or general so the whole site can use it.

To allow any site at all to use the Form Processor Pro 4.1 installed on your site, comment out this value entirely. But it is not recommended as everyone will be able to send emails through your web site and this will be called SPAM. Thus using this variable in right way will allow you to prevent SPAM.

Example:
Referers = www.yoursite.com #your forms on the whole site "www.yoursite.com" can use script.
Referers = www.yoursite2.com/users/john #only forms, submitted below the site and directory set, can use the script.

attachments_path
Specifies the path where user uploads and attachments reside. Relative to the folder set in base_path variable. Requires write permission to be set for that folder (see section Installing FPP/Installation/Step 3 for more details)
Examples (base_path is set to '/home/user/'):
attachments_path = ../attach/ #GOOD, destination folder is /home/attach/.
attachments_path = attachments/ #GOOD, destination folder is /home/user/attachments/.
attachments_path = /home/attach/ #BAD: incorrect path; folder /home/user/home/attach/ doesn't exist.

attachments_ttl
Specifies user attachments' time-to-live on server, in seconds. Default is 3600 (1 hour).

max_file_size
Specifies maximal file size for upload files, in Kbytes. Default is 0 (unlimited)
Examples:
max_file_size = 1024 #Good, file size is limited to 1 MByte (1 Mbyte = 1024 KBytes)
Max_file_size = -1 #BAD: file size cannot be less than zero.

date_format
Specifies date format used in output templates (e.g. e-mails, logs, result pages etc.). Used in composite variable DATE_GMT (see section FPP Co/Section #). This variable is constructed from the following patterns to match standards in date output format:

yyyy year in 4-digit format (e.g. 2003)
yy year in 2-digit format (e.g. 03)
month full textual representation of a month (e.g. January)
mmm short textual representation of a month, three letters (e.g. Jan)
mm month in 2-digit format (e.g. 01)
weekday full textual representation of a weekday (e.g. Monday)
wee short textual representation of a weekday, three letters (e.g. Mon)
dd day of the month in 2-digit format (e.g. 01)


You may use any ASCII character as a separator between numbers and strings as well.

Examples:

date_format = dd mmm yyyy # Produces 27 Apr 2003
date_format = wee dd/mm/yy # Produces Sun 27/04/03
date_format = weekday month dd, yyyy #Produces Sunday April 27, 2003
Default value is dd.mm.yyyy

_captcha
Specifies the look of the CAPTCHA feature, a generated image with random alphanumeric combination for preventing your forms from scripted submissions and spam. Works with PHP version only. Possible values are:


_captcha = 0

_captcha = 1

_captcha = 2

_captcha = 3


Type 0 is default and uses digits only. Types 1 and 2 use CAPS letters only, and Type 4 is mixed register letters. Please note that this variable also can be set in local form configuration file (form.cfg), making possible to use individual CAPTCHA formats with your forms.