Configuration
From FiFormsWiki
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.
Contents
|
Initial Configuration
When you first install the FiForms Framework, when you point your browser to http://localhost/fiforms/ yyou will be greeted by a configuration screen that looks similar to the image at the right. Most of the configuration parameters should be set for you to reasonable defaults. There are, however, a couple of elements that you will need to pay special attention to. Scrolling about half-way down through the page, you should come to a section entitled "Online Administration Password." Enter a password that you will use to configure FiForms in the future, and to add forms and applications through the web interface.
Scroll down to the very bottom of the page, where you will find a box for the "ENCRYPT_KEY". Enter some random characters, or a random password, to be used for encrypting data.
When you are finished with the configuration, click "Save Configuration" at the bottom. If the webserver is able to write the new configuration file, you should receive a message saying "Configuration File Created."
Manually Creating Config File (Not usually needed on Windows)
If you are using Linux, or if Apache is not able to write to the the FiForms/scripts directory, then you will get an error message and you will need to manually create the configuration file. It will print the contents that need to be in the file localconfig.php:
Copy and paste the text inside <?php ... ?> (including <?php ?> ) into a new text document using your favorite text editor. Save the file as "localconfig.php" inside the FiForms/scripts folder.
The Graphical Configuration Screen
Resetting Forgotten Passwords
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 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/
Configuration Elements
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".
XMLLINT
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
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 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.
PHPMYADMIN_URI
The URL to phpMyAdmin on this server, if it is installed.
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. This can be set in conjunction with SHOW_DEFINITION to show debugging and timing output for reports (in raw XML output).
SHOW_DEFINITION
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.
PERF_STAT
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.
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, 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
MENU_POPUPS
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'.
MENU_XMLNS
Boolean variable. If true, then menu definitions are expected to be namespace qualified, with all elements in the namespace http://xml.fiforms.org/FiFormsMenu/ . This should always be set to TRUE for new development. Defaults to FALSE for backwards compatibility.
USE_COMBINED
Use the combined, single include file rather than multiple files in the FiForms-includes directory. Defaults to FALSE. (Experimental)
NEW_FILE_MODE
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)
NEW_FILE_GROUP
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)
NEW_DIR_MODE
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)
NEW_DIR_GROUP
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)

