The followingConfigurationBased on mantis1.1
1. Chinese Character Set
To: Solve browser accessMantisChinese font garbled
Modify the default configuration file config_defaults_inc.php in Mantis. Find the following content and modify it accordingly.
You can copy the following content to config_inc.php.
Configuration file loading sequence: First load config_defaults_inc.php, then load config_inc.php.
The value in config_inc.php overwrites config_defaults_inc.php.
################################
# Mantis language settings
################################
# --- Language settings -----------
# If the language is set to 'auto', the actual
# Language is determined by the user agent (Web browser)
# Language preference.
$ G_default_language = 'Chinese _ simplified_gb2312 ';
# List the choices that the users are allowed to choose
$ G_language_choices_arr = array (
'Auto ',
'Bulgarian ',
'Catalan ',
'Chinese _ simplified_gb2312 ',
'Chinese _ traditional ',
'Croatianc ',
'Czech ',
'Danish ',
'Utch ',
'English ',
'Estonian ',
'Finnish ',
'French ',
'German ',
'Hebrew ',
'Hungarian ',
'Icelandic ',
'Italian ',
'Japan ese ',
'Background ',
'Latvianc ',
'Lithuanian ',
'Norwegia ',
'Polish ',
'Portuguese _ Brazil ',
'Portuguese _ standard ',
'Romanian ',
'Russian ',
'Serbian ',
'Slovak ',
'Slovene ',
'Spance ',
'Swedish ',
'Turkish ',
'Ukrainian'
);
# Browser language mapping for 'auto' language selection
$ G_language_auto_map = array (
'Bg '=> 'Bulgarian ',
'CA' => 'catalan ',
'Zh-CN, ZH-SG, ZH '=> 'Chinese _ simplified_gb2312 ',
'Zh-HK, ZH-tw '=> 'Chinese _ traditional ',
'Cs '=> 'czech ',
'Da' => 'danish ',
'Nl-be, NL '=> 'utch ',
'En-US, en-GB, en-Au, en' => 'inc ',
'Et' => 'estonian ',
'Ffi '=> 'finnish ',
'Fr-Ca, fr-be, fr-Ch, f' => 'French ',
'De-de, de-at, de-Ch, de' => 'German ',
'H' => 'hebrew ',
'Hu' => 'Hungarian ',
'Hr' => 'croatian ',
'Is '=> 'icelandic ',
'It-Ch, it' => 'Italian ',
'Jar' => 'shanghaiese ',
'Ko' => 'kore ',
'Lt '=> 'lithuanian ',
'Lv' => 'latvianc ',
'No' => 'norwegia ',
'Pl' => 'Polish ',
'Pt-br' => 'portugese _ Brazil ',
'Pt' => 'portugese _ standard ',
'Ro-mo, ro' => 'romanian ',
'Ru-mo, Ru-Ru, Ru-UA, Ru '=> 'Russian ',
'Sr' => 'serbian ',
'Sk' => 'slovak ',
'Sl '=> 'slovene ',
'Es-MX, es-co, es-AR, es-cl, es-PR, els' => 'spance ',
'Sv-Fi, sv' => 'Swedish ',
'Tr' => 'Turkish ',
'Uk' => 'ukrainian'
);
# Fallback for automatic language selection
$ G_fallback_language = 'English ';
2. mail configuration
To: Solve the mail sending Problem
The following content can be found in config_defaults_inc.php.
We recommend that you copy the content to config_inc.php.
#############################
# Mantis email settings
#############################
# --- Email variables -------------
$ G_administrator_email = 'testsrv @ xxx.com ';
$ G_webmaster_email = 'testsrv @ xxx.com ';
# The 'from: 'field in emails
$ G_from_email = 'testsrv @ xxx.com ';
# The return address for bounced mail
$ G_return_path_email = 'testsrv @ xxx.com ';
# Allow email notification
# Note that if this is disabled, sign-up and password reset messages will
# Not be sent.
$ G_enable_email_notification = on;
# Select the method to mail:
#0-mail ()
#1-sendmail
#2-SMTP
$ G_phpmailer_method = 2;
# This option allows you to use a remote SMTP host. must use the phpmailer SCR limit PT
# Name of SMTP host, needed for phpmailer, taken from PhP. ini
$ G_smtp_host = 'mail .xxx.com ';
# These options allow you to use SMTP authentication when you use a remote
# SMTP host with phpmailer. If smtp_username is not ''then the username
# And password will be used when logging in to the SMTP server.
$ G_smtp_username = 'testsrv ';
$ G_smtp_password = 'testsrv ';
We recommend that you use SMTP for mail system configuration. Generally, the company has its own email server, which allows the Administrator to open a special mailbox for Mantis.
In addition, when I configured the Mantis mail service, I also encountered a situation where the mail was successfully sent but could not be received. I asked the company administrator to help me find it from the background log of the mail server. The original is to write the testsrv@xxx.com as a testesrv@xxx.com.
Be careful!
Experience.
3. graphical reports
To: solves the problem of Chinese font output in graphic reports.
In mantis1.1, it is a little simpler now. You only need to change the font.
Open the core \ graph_api.php file, find the following content, and add a line:
Function graph_get_font (){
$ T_font_map = array (
'Simsun' => ff_simsun,
'Arial' => ff_arial,
'Verdana '=> ff_verdana,
'Courier '=> ff_courier,
'Comic '=> ff_comic,
'Times '=> ff_times,
'Georgia '=> ff_georgia,
'Trebucket' => ff_trebuche,
'VERA' => ff_vera,
'Veramono' => ff_veramono,
'Veraserif' => ff_veraserif );
$ T_font = config_get ('graph _ font ','');
If (isset ($ t_font_map [$ t_font]) {
Return $ t_font_map [$ t_font];
} Else {
Return ff_font1;
}
Note that config_inc.php or config_defaults_inc.php should have the following configuration content:
############################
# Mantis jpgraph addon
############################
# --- Jpgraph settings ---#
# Initial version from Duncan lisset
#
# To use the jpgraph addon you need the jpgraph package from
# Http://www.aditus.nu/jpgraph/index.php
# 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 /');)
$ G_use_jpgraph = on;
$ G_jpgraph_path = 'd:/mantis-1.1.0a2/CORE/jpgraph/src '. directory_separator.'. directory_separator; # dont forget the ending slash!
# Note: You must specify the SRC \ jpgraph. php path here. A prompt is displayed when an error occurs on the page.
# What TrueType font will the graphs use. Allowed values are 'arial', 'verdana ', 'courier', 'book', 'comic ', 'times ',
# 'Georgia ', 'trebucket', 'VERA', 'veramono', or 'veraserif'. Refer to the jpgraph manual for details.
# Note: These fonts need to be installed in the ttf_dir as specified to jpgraph
$ G_graph_font = 'simsun ';
# What width is used to scale the graphs.
$ G_graph_window_width = 800;
# Bar graph aspect ration (height/width)
$ G_graph_bar_aspect = 0.9;
# How many graphs to put in each row in the advanced summary page
$ G_graph_summary_graphs_per_row = 2;
$ G_system_font_folder = 'C:/winnt/fonts /';
$ G_font_per_captcha = 'simsun. ttf ';
4. Time Zone settings
To: Solve the Mantis page time display problem. The default GMT Greenwich Mean Time is used, which is 8 hours different from the Chinese time.
Add the following content to config_inc.php or config_defaults_inc.php:
# Time Zone settings
Putenv ("TZ = Asia/Shanghai ");
In addition, some people mentioned the following settings in PHP. ini on the Internet. (If the putenv function does not work, try again)
[Date]
; Defines the default timezone used by the date functions
Date. timezone = Asia/Shanghai
5. Database (MySQL)
Version: MySQL 5.0 Series
Many people use phpMyAdmin to manage Mysql Data.
We recommend that you use MySQL-front. I use version 3.2.
The graphical interface is easy to operate.
The data source connection configuration in mantis is relatively simple. Set it in config_inc.php:
################################
# Mantis database settings
################################
# --- Database variables ---------
# Set these values to match your setup
# Hostname shoshould be either a hostname or connection string to supply to ADODB.
# For example, if you wowould like to connect to a MySQL server on the local machine,
# Set hostname to 'localhost', and db_type to 'mysql '.
# If you need to supply a port to connect to, set hostname as 'localhost: 100 '.
$ G_hostname = 'localhost ';
$ G_db_username = 'mantis ';
$ G_db_password = 'mantis ';
$ G_database_name = 'mantis ';
# HereDatabaseThe username, password, and database name all use Mantis.
# Create a new database user mantis in myssql. Pay attention to give it sufficient permissions.
# Supported types: MySQL for MySQL, mysqli for MySQL, pgsql for PostgreSQL, MSSQL for MSSQLServer, oci8 for Oracle. A lot of database types are supported here.
$ G_db_type = 'mysql ';
6. Web Server (Apache or IIS)
Currently, Mantis is commonly used in these two services. Apache is recommended here.
Apache is now in the 2.2 series. The configuration mainly refers to the configuration of an application service directory,
Open apache \ conf \ httpd. conf and add the following content at the end of the file:
Alias/Mantis "D:/mantis-1.1.0a2 /"
# This is the virtual path setting for service access.
<Directory "D:/mantis-1.1.0a2/">
Options Indexes
AllowOverride none
Order allow, deny
Allow from all
</Directory>
Apache port modification:
# Listen 12.34.56.78: 80
Listen 80
Modify the default application directory:
DocumentRoot "D:/mantis-1.1.0a2"
Reprinted from:
Http://www.51testing.com /? Uid-8774-action-viewspace-itemid-5174