Configuration
From FiFormsWiki
Site-specific FiForms configuration is set up in the file localconfig.php located in the scripts folder. The localconfig.php file loads a default configuration by including FiForms_global.inc.php. Individual configuration elements can be overridden by setting elements of the array FIFORMS_CONFIG in localconfig.php.
Application-specific configuration is set in appconfig.php under each application folder (located at %APP_BASE%/%APP_NAME%/appconfig.php) or the application-specific PHP folder (located at %SCRIPT_PATH%/app/%APP_NAME%/appconfig.php). Elements set in appconfig.php override the site-wide configuration set in localconfig.php.
Please note: the localconfig.php files in the application-specific PHP directories should not be used for configuration. These are simply pointers to the site-wide localconfig.php mentioned above.
Also Note: Names enclosed in %% signs in this documentation indicate the names of configuration elements. For example, paths are often given like this:
%SCRIPT_PATH%/themes/
Let's assume that in a given installation, the script path was
C:/xampp/www/FiForms/scripts
Then this path would be
C:/xampp/www/FiForms/scripts/themes/
Y4Zmfg I am need to price
Contents |
Online Administration Configuration
UPDATEPW_HASH
SHA1 hash of the FiForms online administration password. Use the sha1() function in PHP to hash your password. This password is not related to your mysql password. Note that to use online administration, this password must be set and UPDATE_HOST must be one of "any" or "localhost".
UPDATE_HOST
Specifies who is allowed to use the online administration feature. Should be one of "any" (any host), "localhost" (local host only), or "none" (disabled). Defaults to "none".
FiForms Configuration
OS
Operating system of the server running FiForms. This should be one of "Linux" or "Windows", with "Linux" being used to specify any *nix based system (Linux, Unix, BSD, Mac OS X, etc.) This is normally automatically detected by FiForms_global.inc.php, so this should not have to be specified manually.
VERSION
Current version of FiForms installed. This is specified in FiForms_global.inc.php and should not be overridden manually.
APP_NAME
Name of FiForms application to use. This is automatically set by reading $_GET['app'] but it can be overridden in localconfig.php if you have only one application.
You must call the function FIFORMS_SET_APP_PATH() after setting APP_BASE in order to update the XML_PATH, MENU_PATH, and RPT_PATH variables.
PHP_XSLT
Set to TRUE to use the internal PHP XSLT processor in PHP5. Set to FALSE to use the external xsltproc application specified in XSLTPROC. Defaults to FALSE.
DEFAULT_LIMIT
Number of records to show per page in sheetview. Defaults is 20.
ICON_SET
Name of the theme to apply to FiForms pages. This should correspond with the name of a directory under scripts/themes/. See the article on Creating FiForms Themes for more information. Default is "topblue-gif".
DEFAULT_HEADER
Additional HTML to include within the HTML <head>...</head> element one page output.
AUTH_REALM
Realm used in HTTP Basic authentication. Default is "FiForms"
ENCRYPT_KEY
A random 24-byte key used to encrypt SQL code and session data passed to the browser. This must be set to enable record change detection and merging in FiForms. Do not use something that is easy to guess. Anyone who knows this key can execute arbitrary SQL code on the server. If you are using a shared server, be sure to set permissions correctly on localconfig.php so that other users cannot steal this key.
Note: This feature requires the mcrypt library in PHP. If the mcrypt library is not installed then leave this field blank to disable this feature.
Path Configuration
SCRIPT_PATH
The local path on the server to the FiForms php scripts (i.e. the path to localconfig.php, view.php, generate.php, list.php) This is the scripts/ folder inside the FiForms zipfile. FiForms tries to detect this automatically, but you may need to specify this manually in abnormal configurations. Note that this is the only path that is required to be inside the webserver document root. The URI element references the URI to access this directory through the webserver.
INCLUDE_PATH
The local path on the server to the FiForms include files. This is automatically set to the path where FiForms_global.inc.php is located. In the example localconfig.php file given above, the line
require_once(dirname(dirname(__FILE__))."/FiForms-includes/"."FiForms_global.inc.php");
looks for FiForms_global.inc.php at
%SCRIPT_PATH%/../FiForms-includes/FiForms_global.inc.php
APP_BASE
The local path on the server to FiForms XML Application definitions. This defaults to
%INCLUDE_PATH%/../apps/
Please note that storing XML applications within your webserver document root is insecure. It is strongly recommended that you move APP_BASE outside of your document root and point this variable to the new location.
You must call the function FIFORMS_SET_APP_PATH() after setting APP_BASE in order to update the XML_PATH, MENU_PATH, and RPT_PATH variables.
XML_PATH
The local path on the server to XML Form Definitions. This is automatically set to
%APP_BASE%/%APP_NAME%/forms/
by calling the FIFORMS_SET_APP_PATH() function.
MENU_PATH
The local path on the server to XML Menu Definitions. This is automatically set to
%APP_BASE%/%APP_NAME%/menus/
by calling the FIFORMS_SET_APP_PATH() function.
RPT_PATH
The local path on the server to XML Report Definitions. This is automatically set to
%APP_BASE%/%APP_NAME%/reports/
by calling the FIFORMS_SET_APP_PATH() function.
AUTH_MODULE
Local path to a PHP include defining the class FiFormsAuth. This defaults to
%INCLUDE_PATH%/FiForms_BasicAuth.inc.php
You should only need to override this if you use a custom authentication module.
TEMP_PATH
Local directory writable by the webserver to be used in installing FiForms applications through the web administration interface. Defaults to %SCRIPT_PATH%/temp/.
External Programs
XSLTPROC
xsltproc application used to transform XML if %PHPXSLT% is false. On Linux, this defaults to "xsltproc" and on Windows it defaults to "%APP_BASE%/bin/libxml2/xsltproc.exe".
UNZIP
unzip application used to extract zipfiles uploaded through the FiForms Admin interface. On Linux, this defaults to "unzip" and on Windows it defaults to "%APP_BASE%/bin/unzip/unzip.exe".
MYSQLDUMP
mysqldump application for exporting or backing up a database through the FiForms Admin interface. This defaults to "mysqldump." If mysqldump is not in your path, be sure to set it here if you want database backup functionality.
URI Configuration
SERVER_ADDRESS
The base URI to the root of the webserver i.e. http://localhost
URI
The URI to the FiForms scripts on the webserver i.e. http://localhost/FiForms/scripts This is the URI that is used to run PHP scripts which are located at SCRIPT_PATH.
Database Configuration
DEFAULT_SERVER
Name or IP address of MySQL Database server. Default is localhost.
DEFAULT_USER
User to connect to MySQL database. If you specify a valid user and password here, users will be able to use applications without logging in and will not be prompted to login. Leave this blank to force users to log in before accessing the forms.
DEFAULT_PASSWORD
If Configuration#DEFAULT_USER is specified, use this password to connect to the MySQL database.
DEFAULT_DATABASE
The name of the MySQL database schema to use by default, if none is specified in the form definition.
MYSQL_VERSION
Numerical value indicating the MySQL server version in use.
HTTP Report Server Configuration
REPORT_OUTPUT_XMLNS
Boolean variable, If TRUE, then FiReports will declare the XML namespace in the output of all reports:
xmlns="http://xml.fiforms.org/FiReports/"
This defaults to FALSE for compatibility reasons. It is recommended to set this to TRUE for new application development.
ALLOW_USER_QUERIES
If TRUE, allow users to execute arbitrary SQL on the server. This is a HUGE security risk, and should be left disabled unless you are sure you know what you are doing, or you don't care about your data. Default is FALSE.
ALLOWED_SERVERS
Comma-seperated list of database servers that user-supplied SQL queries are allowed to connect to. Default is ",localhost" (localhost only). Can be set to "_ANY_" to allow connection to any arbitrary server on the network.
Debugging Options
QUERY_DEBUGGING
If TRUE, show all SQL queries in an HTML comment in the output of forms. Useful for debugging but also a slight security risk. Default is FALSE
SHOW_DEFINITION
If TRUE, allow showing of SQL statements in the XML output of reports. Default is FALSE.
USE_XHTML
If TRUE, FiForms will output strict XHTML. Otherwise, FiForms will output HTML. Default is FALSE.
See the article on XHTML Support in Fiforms.
CONNECT_EARLY
Establish MySQL database connection at an earlier point in building the FiForm. Normally not needed and defaults to false. Option is provided for backward compatibility with older versions of FiForms, where this was the default behaviour.
Application Registry
These variables are not set in localconfig.php but are built dynamically by the appreg.php scripts under each application.
AVAILABLE_APPS
An array containing the unix names of each application
AVAILABLE_APP_INFO
An associative array multi-dimensional array containing additional information about each application. Each element of the array is indexed by the application unix name, and is an associative array containing elements apptitle, appsummary, andappdatabase.

