Mantis1.1.1的安装配置

上一篇 / 下一篇  2009-05-18 17:51:09

                     Mantis1.1.1的完全配置与安装

基本配置

1 在官网http://sourceforge.net/project/showfiles.php?group_id=14963&package_id=166159上下载了"mantisbt-1.1.1.zip",

2 进行解压后放在一个目录下,该目录名称不能为中文,不能有空格显示,因给要符合APACHE的预期

3、 解决中文乱码问题:

第一步、修改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',

  ..........................
# 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',

第二步、在文件"core/lang_api.php"中修改字符串
function lang_get( $p_string, $p_lang = null ) {
成为
function lang_get( $p_string, $p_lang ='chinese_simplified_gb2312') {

 

4、 邮箱邮件配置

mantis目录下的config_defaults_inc.php中修改如下片断:

$g_administrator_email ='jiangmingli@yuteng.com';

$g_webmaster_email            ='jiangmingli@yuteng.com';

 

     # the sender email, part of 'From: ' header in emails

     $g_from_email                     ='jiangmingli@yuteng.com';

    

     # the sender name, part of 'From: ' header in emails

     $g_from_name                     = 'Mantis Bug Tracker';

 

     # the return address for bounced mail

     $g_return_path_email     ='jiangmingli@yuteng.com';

 

$g_smtp_host                    ='192.168.1.8';//系统用采用的邮箱的服务器,如果是163的就相应改成smtp:163.com

$g_smtp_username ='jiangmingli@yuteng.com';

$g_smtp_password ='19820812';

5、 新用户

修改config_defaults_inc.php.
    # if ON users will be sent their password when reset.
    # if OFF the password will be set to blank. If set to ON, mail settings must be
    # correctly configured.
   $g_send_reset_password    = OFF;

注意:以上修改一定要记得要修改root\mantis下的而不是根目录下的才有效。

6、 安装及配置jpgraph

第一步、下载jpgraph-1.27.tar.gz,加压到“…….root\mantis\core\”目录下,名称为jpgraph

第二步、打开core\graph_api.php文件,找到function graph_get_font(),在里面加一句

'simsun' => FF_SIMSUN,

第三步、在config_defaults_inc.php中应该有以下配置内容

     # --- 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:/InstantMantis-1.1.1/root/mantis/core/jpgraph/src/';#注意src后面加/,该目录就是你放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:/windows/fonts';

    $g_font_per_captcha='simsun.ttf';

配置完成后点击“统计报表”如果出现以后提示

JpGraph Error Your PHP installation does not seem to have the required GD 2.x library enabled. Please see the PHP documentation, "Image" section. Make sure that "php_gd2.dll" statement is uncomment in the [modules] section in the php.ini file.

还应该修改

确认在PHH.INI文件中把php_gd2.dll前面的注释去掉了就是删除这行前面的分号,php.ini文件的前身就是php.ini-dist,安装PHP后修改配置后修改php.ini-distphp.ini

这样改了后点击就不会出错了。

 

还应该吧php_gd2.dll这个文件放到C:\WINDOWS\system32目录下和php的目录下

定制修改

1.    D:\InstantMantis-1.1.1\root\mantis\lang\strings_chinese_simplified_gb2312.txt这个文件下

$s_issue_id = '问题#';改成$s_issue_id = '问题';

2.    修改上传附件大小,直接上传到本地磁盘上,不再存放到数据库中了

D:\InstantMantis-1.1.1\root\mantis下建立个upload新文件夹,然后

(1) 将项目的上传文件存放路径设置成D:\InstantMantis-1.1.1\root\mantis\upload

(2) 修改D:\InstantMantis-1.1.1\root\mantis\config_defaults_inc.php

allow_file_upload    = ON;

# Upload destination: specify actual location in project settings

     # DISK, DATABASE, or FTP.

    $g_file_upload_method  = DISK;

ax_file_size              = 5000000; # 5 MB

     # Files that are allowed or not allowed.  Separate items by commas.

     # eg. 'php,html,java,exe,pl'

     # if $g_allowed_files is filled in NO other file types will be allowed.

     # $g_disallowed_files takes precedence over $g_allowed_files

    $g_allowed_files            = 'txt,jpg,jepg,gif,bmp,doc';#允许上传附件的格式,其中可以直接缩略图显示上传的jpg格式的图片

     $g_disallowed_files        = '';

bsolute_path_default_upload_folder = 'D:\InstantMantis-1.1.1\root\mantis\upload';

     $g_preview_attachments_inline_max_size=99999;#99999数值是与字节计算的,如果上传的任何小于这个字节大小的bmppnggifjpg格式的图片文件直接显示

3、删除D:\InstantMantis-1.1.1\root\mantis目录下的admin文件夹,重新设置administrator的登录密码等个人信息

 

    注:如果出现以下的错误

APPLICATION ERROR #18

页面重定向错误,请确定在config_inc.phpcustom_*.php文件的PHP代码块(部分)中没有多余的空格。

 

config_inc.php另存一下,存为utf8bom格式,则才显示正常。这是因为所有的文本编辑软件都可以显示并编辑UTF-8编码的文件。但是很多软件里,如WINDOWS自带的记事本等软件,在保存一个以UTF-8编码的文件时,会在文件开始的地方插入三个不可见的字符(0xEF 0xBB 0xBF,即BOM)。它是一串隐藏的字符,用于让记事本等编辑器识别这个文件是否以UTF-8编码。对于一般的文件,这样并不会产生什么麻烦。但对于PHP来说,BOM是个大麻烦。所以我们保存的时候采用utf8bom格式避免这种问题的发生。而出现APPLICATION ERROR #18的错误也是由这引起的。

所以在修改配置文件的时候要用专门的文本编辑工具进行编写,不要用打开记事本方式

 

附件直接浏览功能:
  
在提交一个issue的时候,有时候会有截图提交附件情况,希望能直接看到错误截图而不想自己下载后再看,目前Mantis只是针对bmp, png, gif, jpg格式的图片文件实现了在

TAG:

 

评分:0

我来说两句

Open Toolbar