Configuring WebIssues

This chapter explains the configuration options available in the config/config.inc.php file. Use the configuration template to create this file and edit it to your needs before running the setup or upgrade.

Note

Make sure that the configuration file is not accessible to anyone except the web server process. See the Security chapter for more information.

Database connection

Depending on the type of the database server, you have to select the appropriate database engine. There are currently four available engines:

mysql

Engine for MySQL. Requires the mysql PHP extension.

mysqli

Engine for MySQL. Requires the mysqli PHP extension and MySQL version 4.1 or newer.

pgsql

Engine for PostgreSQL. Requires the pgsql PHP extension.

mssql

Engine for SQL Server. Only supported on Windows; requires PHP5.

Configuring the database connection requires entering four parameters: the database server host name, the database name and the user name and password used to authenticate the connection.

The db_host is usually a computer name or IP address. It may be followed by a semicolon and port number if a non-standard port is used. When connecting to a local MySQL server, the MySQL client will automatically use a Unix local socket or Windows named pipe if it's available. To connect to the PostgreSQL server using a local socket, leave the db_host option blank.

In case of SQL Server 2005 and SQL Server 2005 Express, the db_host option should include the computer name and server instance, for example SERVER\SQLEXPRESS. Also make sure that TCP/IP connections are enabled in the server's configuration and in case of SQL Server 2005 Express that it has a static port number assigned.

Usually the WebIssues Server connects to the database using SQL authentication, which requires passing a login and password which have to be stored in the configuration file. You can also configure SQL Server or PostgreSQL to use integrated authentication (called identity authentication in PostgreSQL). In that case leave the db_user and db_password option blank and give appropriate permissions to the database for the account used by the web server process.

If the database is shared between multiple applications, enter a unique prefix in the WebIssues configuration to avoid clashes with other database name. The prefix should begin begin with a letter and contain only letters, digits and underscore characters. You can also create multiple instances of the WebIssues Server sharing the same database, but using a different prefix.

Attachment storage

By default all attachments larger than 4000 bytes are stored in the files system instead of the database. This improves performance and decreases the size of the database. You can adjust the threshold value by changing the storage_min_size option in the configuration file.

The attachment files are stored by default in the storage subdirectory of the directory where the WebIssues Server is installed. You have to create that directory and make sure it's readable and writable for the web server. You can change the location of the attachment storage to a location outside the server's root directory to improve security or if you want to store the files on a different disk partition. In that case modify the storage_path option to enter the path of the storage directory.

You can also disable file storage and force storing all attachments in the database. To do that, clear the default value of the storage_path option. Note that database storage has significantly worse performance for large attachments.

If you want the server to be able to handle large file attachments, you may have to change the upload_max_size and post_max_size parameters in the PHP configuration. Refer to the PHP manual for more details. Also adjust the memory limit and execution time limit for the PHP scripts.

If you are storing large attachments in the database, you may also need to increase the limit of query size on the database server. For example when using MySQL, change the max_allowed_packet option in the server's configuration.

Logging

By default the server's errors log is written to the log subdirectory of the directory where the WebIssues Server is installed. You have to create that directory and make sure it's readable and writable for the web server. You can change the location of the log file to another directory, for example /var/log. In that case modify the log_errors option to enter the path of the log file. Remove the default value to disable logging.

Two additional log files can be enabled: log_commands enables logging all commands from the clients and server responses and log_sql enables logging all SQL queries executed by the server and their results. These logs are only useful for debugging purposes and should never be enabled on production servers.