From FiFormsWiki

Jump to: navigation, search

This document gives an overview on how to configure the FiForms Framework. If you've just installed the FiForms Framework for the first time, we recommend that you use the graphical screen described below in "Initial Configuration." At the end of this document under Configuration#Configuration Elements is a reference for every configuration element (or parameter) that may be specified in the configuration.


Configuration Files

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 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:


Let's assume that in a given installation, the script path was


Then this path would be


Configuration Elements

External Programs


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".


xmllint application used to validate XML. On Linux, this defaults to "xmllint" and on Windows it defaults to "%APP_BASE%/bin/libxml2/xmllint.exe".


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 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


The base URI to the root of the webserver i.e. http://localhost


The URL 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.


The URL to phpMyAdmin on this server, if it is installed.

Database Configuration


Name or IP address of MySQL Database server. Default is localhost.


User to connect to MySQL database. Password is specified as DEFAULT_PASSWORD. The behavior of this variable depends on the Authentication module specified.

  • With Basic Authentication, 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.
  • With LDAP Authentication, this is the username/password to connect with MySQL, or if LDAP_GROUPS is specified, then this is the password used if no group is matched.


If Configuration#DEFAULT_USER is specified, use this password to connect to the MySQL database.


The name of the MySQL database schema to use by default, if none is specified in the form definition.


Numerical value indicating the MySQL server version in use. This should be either 4 or 5 (decimal version, such as 4.1, 5.1 etc. is not needed).

HTTP Report Server Configuration


Boolean variable, If TRUE, then FiReports will declare the XML namespace in the output of all reports:


This defaults to FALSE for compatibility reasons. It is recommended to set this to TRUE for new application development.


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.


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


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. This can be set in conjunction with SHOW_DEFINITION to show debugging and timing output for reports (in raw XML output).


If TRUE, allow showing of SQL statements in the XML output of reports. Default is FALSE. If set in conjuction with QUERY_DEBUGGING, this will display a debug option on the report parameter screen to include SQL and timing information in report output.


If TRUE, log page loads, queries, and performance statistics in the fiforms_performance database. See the article on Performance Tuning for more details. Default is FALSE.


If TRUE, FiForms will output strict XHTML. Otherwise, FiForms will output HTML. Default is FALSE.

See the article on XHTML Support in Fiforms.


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.


Boolean variable. If true, then no gzip compression is applied to pages. Set this option if you receive compression or encoding errors in the browser (often due to notices being printed before compressed output is sent).

Application Registry

These variables are not set in localconfig.php but are built dynamically by the appreg.php scripts under each application.


An array containing the unix names of each application


An associative, 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, and appdatabase.

Behavior Options


Set to either 'default' or 'new'. If set to 'new', forms are always opened in a new tab, rather than the popup window as defined in the form definition. Default is 'default'.


Boolean variable. If true, then menu definitions are expected to be namespace qualified, with all elements in the namespace . This should always be set to TRUE for new development. Defaults to FALSE for backwards compatibility.


Use the combined, single include file rather than multiple files in the FiForms-includes directory. Defaults to FALSE. (Experimental)


Octal file mode set to newly created files, such as applications files and forms. Defaults to 0775. Affects Linux and Unix-based Operating Systems (has no effect on Windows). (effective in version 1.1.1 and later)


Group for newly created files. The webserver user must be a member of this group. Affects Linux and Unix-based Operating Systems (has no effect on Windows). (effective in version 1.1.1 and later)


Octal file mode set to newly created directories in applications. Defaults to 0775. Affects Linux and Unix-based Operating Systems (has no effect on Windows). (effective in version 1.1.1 and later)


Group for newly created directories. The webserver user must be a member of this group. Affects Linux and Unix-based Operating Systems (has no effect on Windows). (effective in version 1.1.1 and later)


Treat all primary keys in a binary-safe manner. This should be TRUE if you are using binary UUIDs in any applicaiton. Defaults to FALSE.

Login and Authentication System


sha1 hash of the online administrative password (used to protect system pages like the application creator, form creator, fiforms info page, etc when using Basic Authentication).

You can set the password manually by specifying the SHA1 here. On Linux, use a command similar to the following to generate the hash sum for a new password:

echo -n "password" | sha1sum

Alternatively, you can use a service like this one:

If you got "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8" then your password is definitely too weak... ;)


Determines which hosts have access to the administrative features of FiForms. Should be one of "any" or "localhost".


Full path to authentication module to use. The following authentication modules are available in the development version of FiForms:

    • A simple authentication system using basic HTTP Authentication. Credentials are passed from the user directly to MySQL, so no credentials are stored in the configuration, and new users are setup as MySQL users.
    • Simplistic session-based authentication. This is provided mainly as a demonstration or template for creating your own authentication module.
    • Cookie-based authentication that aims to support multiple users and roles, with users and roles stored in a MySQL database.
    • Authenticates users against an external LDAP server such as Active Directory. Internally uses PHP sessions to keep track of user logins. See LDAP Authentication for setup details.


The authentication realm used in HTTP Basic Authentication. Default is "FiForms".


The MySQL Server with the user privilege and authentication database for Cookie based authentication


Name of MySQL Database to use for privileges and authentication.


MySQL Login username with select privileges only on the database specified in AUTH_DB, as well as select, insert, update, delete privileges on the sessionmaster table in the same database.


Password for AUTH_USER


URL to external LDAP server for external LDAP Authentication, e.g. "ldaps://"


Fully Qualified Active Directory Domain Name for external LDAP Authentication. e.g. ""


LDAP RDN. If not set, the default value is based on LDAP_DOMAIN.

   $FIFORMS_CONFIG['LDAP_RDN'] = "domain\\%u";


Search base for finding the user in LDAP (Only needed if LDAP_GROUPS is set).

  $FIFORMS_CONFIG['LDAP_BASE'] = 'dc=domain,dc=example,dc=com';


Filter to search for the user account (Only needed if LDAP_GROUPS is set). If unset, the value below is the default:

   $FIFORMS_CONFIG['LDAP_FILTER'] = 'samAccountName=%u';


Maps LDAP Groups to internal FiForms group names.

        "CN=Domain Admins,CN=Users,DC=domain,DC=example,DC=com" => 'domainadmin',
        "CN=Administrators,CN=Builtin,DC=domain,DC=example,DC=com" => 'admin'


Maps FiForms group names to MySQL User Account names. Applicable groups match in array order, so list highest privilege users first. Un-matched groups get the default username and password.

         'domainadmin' => 'root'


Passwords for MySQL Users

         'root' => 'password'


Personal tools
This is a cached copy of the requested page, and may not be up to date.

Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.

(Can't contact the database server: The server requested authentication method unknown to the client (localhost))

You can try searching via Google in the meantime.
Note that their indexes of our content may be out of date.