Mantis Configuration Documentation

by Kenzaburo Ito (kenito@300baud.org)

Introduction

This is the Mantis system configuration documentation.

Table of Contents

Some variables function as toggles (On/Off). Unless otherwise noted 0 is Off and 1 is On.


Content

 
Database
$g_hostname Database hostname (often localhost)
$g_port Database port (default: 3306)
$g_db_username Database username
$g_db_password Database password
$g_database_name Database name
The database settings must be set in order for the package to work properly. Make sure you verify the settings each time to upgrade.

 
Path
$g_path Path to your installation as seen from the web browser; this is what ayou type into the URL field. Requires trailing / character.

eg. http://mantisbt.sourceforge.net/mantis/

$g_icon_path This is the path to the icons directory as seen from the web browser. This is useed for IMG tag usage.
$g_absolute_path This is the absolute path to your installation. THis is the path that you see when you are telneted or sshed into the server. You can type pwd to find out. Symlinks are not allowed. Requires trailing / character.

eg. $g_absolute_path = "/usr/local/share/apache/htdocs/mantis/";

These path settings are important for proper linking within your database.
The examples are unix style but you can use windows style paths as well (eg. "\\apache\\htdocs\\mantis\\" ).

 
Web Server
$g_use_iis You need to set this to 1 if you use Microsoft's IIS. This helps correct a bug in IIS.
Any web server specific bugs and workarounds can be controled from here.

 
Version
$g_mantis_version The version of Mantis installed.
$g_show_version Determines wheter to dsiplay the version of Mantis at the bottom of every page.

 
Email
$g_administrator_email This is the email that users should notify when problems occur.
$g_webmaster_email This is the webmaster email. Often, this will be the same as the administrator email.
$g_from_email This is the email address displayed in the "From: " field.
$g_to_email This is the email address displayed in the "To: " field. The email system sends a email to this email address. The actually email to users is sent via the "bcc: " field. This is to help cut down on the number of emails sent per incident. A good use of this would be to use this as a mailing list or archive email address.
$g_return_path_email This is the email address that the users can reply to. Usually users should never respond to emails. This may be used by the administrator to track bounced emails and, thus, invalid email accounts.
$g_allow_signup This variable toggles whether or not to allow users to signup for their own accounts. Users must enter a valid email address. A randomnly generated password is sent to that address. Users cannot gain access without receiving this email.

If set to off then administrators must create accounts for users. Furthermore they must notify users manually.

$g_enable_email_notification Toggle whether the site allows email notification or not.
$g_notify_developers_on_new Toggle to notify Developers, Managers, and Administrator when a new bug comes in. Users need to turn on their preference (Email on New) as well.
$g_validate_email Toggle to check whether an email is valid before allowing a signup. This checks for a properly formatted email and a valid MX record.
$g_check_mx_record Disable the MX record check in the email validation routine.
$g_hide_user_email This disables the automatic generation of mailto: links
$g_use_x_priority This can disable the generation of the X-Priority header. Apparently Outlook Express treats 0 as high priority.
$g_use_bcc Set to 0 as on Windows systems, as long as php-mail-function has its bcc-bug (~PHP 4.0.5/6). See bug numbers 10136, 11349, 11616, 11797,
$g_use_phpMailer Use phpMailer instead of standard mail() function (REQUIRES PHP 4.x.x)

Get the phpMailer-package from http://phpmailer.sourceforge.net
The installation is very simple you only need 2 plain text php-files

  • class.smtp.php
  • class.phpmailer.php
Copy these files to your php-include-dir (eg: "c:\php\includes" or "/usr/lib/php/includes") and add this path to the "include_path"-entry in the php.ini file.
The installation is described in the readme and there is also a simple example included.

PhpMailer comes with a detailed documentation in phpdoc format. It is distributed under the LGPL.

$g_phpMailer_method select the method to mail by:
  • 0 - mail()
  • 1 - sendmail
  • 2 - SMTP
  • $g_smtp_host This option allows you to use a remote SMTP host if you use the phpMailer script in SMTP mode.
    The email system allows the package to notify users when significant events occur. You should have a working Mail Transport Agent (MTA) on your system. On unix systems this is usually sendmail and usually nothing needs to be done. For problems regarding mail then visit the support forums or read up on the user notes in the mail() function at: http://www.php.net/manual/en/function.mail.php

    Users can also signup for their own accounts. Emails must be valid!

    You may now use the phpMailer script to send out emails. It is recommended if you currently use Windows and PHP 4.0.4 or higher.

     
    Language
    $g_default_language The default language for the installation. T
    $g_language_choices_arr List of the choices that the users are allowed to choose. These must be preserved in array format. Each corresponds to a certain strings_*.txt file. "korean" would be strings_korean.txt and so on.
    Each installation has a default language. This will be used when signing up and is what each new account will be set to. Users can change their account preferences to use a language that they are more comfortable with.

    NOTE: There is one current flaw in the system. If one user is using German and you are using English and that user generates an email event then you will received the email in German. This should only be a minor inconvenience and may be corrected in the future.

     
    Display
    $g_window_title This is the browser window title (<TITLE> tag).
    $g_page_title This title is displayed in the viewing area of the HTML page.
    $g_show_report
  • 0 - both
  • 1 - only simple
  • 2 - only advanced
  • $g_show_update
  • 0 - both
  • 1 - only simple
  • 2 - only advanced
  • $g_show_view
  • 0 - both
  • 1 - only simple
  • 2 - only advanced
  • $g_show_source Create a link at the bottom of each page that displays the source for that page. Only Administrators can view these pages and this should only be used for debug purposes or in a secure environment.
    $g_show_footer_menu Show the menu at the bottom of the page as well as at the top.
    $g_show_project_in_title
  • 0 : no project name, display $g_page_title
  • 1 : display project name and display $g_page_title
  • 2 : display only project nam, no $g_page_title
  • $g_show_assigned_names When a bug is assigned then replace the word "assigned" with the name of the developer in parenthesis.
    $g_show_priority_text OFF: Shows priority as icon in view all bugs page
    ON: Shows priority as text in view all bugs page
    $g_show_bug_project_links Show project links when in All Projects mode.
    Users can set their own default preferences for the show report/update/view preferences but these settings should override those preferences. These settings affect all projects.

     
    Time
    $g_cookie_time_length Time for 'permanent' cookie to live in seconds (1 year). THis is what is used when people select "save login".
    $g_wait_time Time to delay between page redirects (in seconds). Users can override this setting in their user preferences.
    $g_content_expire Time to wait before document is stale (in minutes). This is used in meta_inc.php.

     
    JpGraph
    $g_use_jpgraph Enabled jpgraph use.
    $g_jpgraph_path Don't forget to add the trailing /
    To use the Jpgraph addon you need the JpGraph package. You can place the package whereever you want, but you have to set the var in jpgraph.php

    eg. DEFINE("DIR_BASE","/www/mantisbt/jpgraph/");

     
    Date
    $g_short_date_format This format is used in the bug listing pages (view_all_bug_page.php3, etc.).
    $g_normal_date_format This format is used in the view bug, update bug pages, bugnotes, manage section, and news section.
    $g_complete_date_format This format is used on the top of each page (current time) and the emails that are sent out.
    These variables control how the date is displayed (default is 'US' formatting). Go to http://www.php.net/manual/en/function.date.php for detailed instructions on alternative date formatting.

     
    News
    $g_news_limit_method Limit by entry count or date
    $g_news_view_limit Limit the number of news entries displayed at one time.
    $g_news_view_limit_days Shows the news entries from the last X days.

     
    Default Preferences
    $g_default_new_account_access_level This is the default access level people are given when their account is created by email. Look in constant_inc.php for other values.
    $g_default_limit_view Site defaults for viewing preferences.
    $g_default_show_changed Site defaults for viewing preferences.
    $g_hide_closed_default Site defaults for viewing preferences.
    $g_min_refresh_delay Make sure people aren't refreshing too often. If a user tries to set his user preference to be lower then it is bumped back up to this minimum value.
    $g_default_advanced_report Default advanced report settings.
    $g_default_advanced_view Default advanced view settings.
    $g_default_advanced_update Default advanced update settings.
    $g_default_refresh_delay Default page refresh delay (in minutes). This is for the bug listing pages.
    $g_default_redirect_delay Default page redirect settings (in seconds).
    $g_default_email_on_new Default email setting when a new bug is reported.
    $g_default_email_on_assigned Default email setting when a bug is assigned to a user.
    $g_default_email_on_feedback Default email setting when a bug is put into feedback status.
    $g_default_email_on_resolved Default email setting when a bug is resolved.
    $g_default_email_on_closed Default email setting when a bug is closed.
    $g_default_email_on_reopened Default email setting when a bug is reopened.
    $g_default_email_on_bugnote Default email setting when a bugnote is added.
    $g_default_email_on_status NOT ENABLED
    $g_default_email_on_priority NOT ENABLED
    These are the settings that each new account is initialized with.

    Default language is set to default site language ($g_default_language).

     
    Summary
    $g_reporter_summary_limit Limit how many reporters to show in the summary page. This is useful when there are dozens or hundreds of reporters.
    $g_summary_pad Default space padding for the summary numbers. Increase this when bug count goes over 99,999 (eep!).
    $g_date_partitions Date lengths to count bugs by (in days) for the summary by date.

     
    Bugnote
    $g_bugnote_order Bugnote ordering: change to ASC or DESC.

     
    File Upload
    $g_allow_file_upload Toggle to allow file attachments and project document uploads.
    $g_file_upload_method
  • DISK
  • DATABASE
  • $g_max_file_size The maximum file size to allow as an attachment. You may also have to configure your php.ini file to increase the execution time, memory limit, max post size, and max upload size.
    This link may provide more information: http://www.php.net/manual/en/features.file-upload.php if you run into problems.

     
    HTML
    $g_allow_html_tags Allow specified HTML tags to be used.
    $g_html_tags This is the list of HTML tags that are allowed.

    Do NOT include href or img tags here.
    Do NOT include tags that have parameters (eg. )

    $g_allow_href_tags Allow A HREF tags
    $g_allow_img_tags NOT ENABLED
    $g_primary_table_tags This is inserted into the outermost tables ( tags like border, cellspacing, etc)
    The HTML code is allowed to enter the database as is. The $g_allow_href_tags does not have to be enabled to make URL links. The pacakge will automatically hyperlink properly formatted URLs (eg. http://blah.balh/ or mailto://me@more.com/)

     
    HR
    $g_hr_size hr size
    $g_hr_width hr width. Leave off the percentage (%) symbol.

     
    LDAP
    $g_ldap_server See README.LDAP
    $g_ldap_root_dn See README.LDAP
    $g_ldap_organisation See README.LDAP
    $g_use_ldap_email See README.LDAP
    LDAP authentication method.

     
    Misc
    $g_reopen_bug_threshold hr size
    $g_quick_proceed See fewer confirmation screens between common actions.
    $g_login_method
    • PLAIN
    • CRYPT
    • MD5
    • BASIC_AUTH
    Some systems (mostly non-unix) do not have crypt support in PHP. MD5 will accomplish almost the same thing. PLAIN is plain text and there is no attempt to secure the password in the database. You will not be able to easily convert between encryption methods so this needs to be chosen at install time. CRYPT was the default until 0.17.0; MD5 is now the default.
    $g_limit_reporters Limit reporters to only viewing bugs that they report.
    $g_allow_close_immediately Allow developers and above to close bugs immediately when resolving bugs.
    $g_allow_account_delete Allow users to delete their own accounts.
    $g_allow_anonymous_login Allow easy anonymous access.
    $g_anonymous_account Set the account that users will login as. Make sure this is a viewer or reporter account.
    $g_cvs_web This allows for quick linking to CVS files via CVSweb or ViewCVS.
    Access level needed to re-open bugs. Look in the constant_inc.php file if you want to set a different value.

     
    Colors
    $g_background_color  
    $g_required_color  
    $g_table_border_color  
    $g_category_title_color  
    $g_category_title_color  
    $g_primary_color1  
    $g_primary_color2  
    $g_form_title_color  
    $g_spacer_color  
    $g_menu_color  
    $g_new_color  
    $g_acknowledged_color  
    $g_feedback_color  
    $g_confirmed_color  
    $g_assigned_color  
    $g_resolved_color  
    $g_closed_color  
    $g_fonts  
    $g_font_small  
    $g_font_normal  
    $g_font_large  
    $g_font_color  
    You can change the look and feel by modifying these values.

     
    Cookies
    $g_cookie_prefix Set this to a unique identifier. Do not use spaces.
    $g_string_cookie The name for the users cookie string value.
    $g_project_cookie The name for the project id cookie.
    $g_view_all_cookie The name for the view all bugs settings cookie.
    $g_manage_cookie The name for the manage settings cookie.
    $g_string_cookie_val The user's cookie_string value. This is a unique identifier for the user.
    $g_project_cookie_val The user's currently active Project ID.
    $g_view_all_cookie_val The user's view all bugs settings.
    $g_manage_cookie_val The users's manage settings cookie.
    I believe there is a limit of 18 or 20 cookies per domain/directory.

     
    Database Tables
    $g_db_table_prefix Change this is if needed but remember to alter all settings in the db_genrate/upgrade files.
    $g_mantis_bug_file_table  
    $g_mantis_bug_table  
    $g_mantis_bug_text_table  
    $g_mantis_bugnote_table  
    $g_mantis_bugnote_text_table  
    $g_mantis_bug_file_table  
    $g_mantis_news_table  
    $g_mantis_project_category_table  
    $g_mantis_project_file_table  
    $g_mantis_project_table  
    $g_mantis_project_user_list_table  
    $g_mantis_project_version_table  
    $g_mantis_user_table  
    $g_mantis_user_profile_table  
    $g_mantis_user_pref_table  
    The prefix is used to help make sure table names are unique. This is useful for users who are limited to one database.

     
    Enum
    $g_access_levels_enum_string  
    $g_project_status_enum_string  
    $g_project_view_state_enum_string  
    $g_priority_enum_string  
    $g_severity_enum_string  
    $g_reproducibility_enum_string  
    $g_status_enum_string  
    $g_resolution_enum_string  
    $g_projection_enum_string  
    $g_eta_enum_string  

     
    Page
    $g_php File extensions for php 3 and php 4
    Set this to ".php" for php4 or whatever your webserver is configured for.
    $g_bottom_include_page If this page eixsts it will be displayed at the bottom of every page. It makes a good company branding include page.
    $g_top_include_page If this page eixsts it will be displayed at the top of every page. It makes a good company branding include page.
    $g_css_include_file Set this to point to the CSS file of your choice.
    $g_meta_include_file Set this to point to the META tag file of your choice.
    Remember to run the convertToPHP4 script if you need the .php extensions.