您的位置:軟件測試 > 開源軟件測試 > 開源Bug管理工具 > Mantis
Mantis的安裝配置-Windows與使用
作者:網(wǎng)絡(luò)轉(zhuǎn)載 發(fā)布時間:[ 2014/1/13 11:46:01 ] 推薦標(biāo)簽:Mantis Windows bug

插播廣告:
(1)設(shè)置好文件上傳后,在mantis目錄下新建upload文件,要在以管理員登錄在"管理"-“項(xiàng)目管理”-“創(chuàng)建項(xiàng)目”下“上傳文件存放路徑 ”欄中指定你的upload文件路徑。剛試下發(fā)現(xiàn)可以上傳照片的哦

(2)
如果要使用圖形報表,要下載jpgraph目前新版本是jpgraph-1.21b.tar.gz?梢栽趆ttp: //www.aditus.nu/jpgraph/jpdownload.php下載新版的JPGraph,請注意JPGraph 1.x 版本是針對php4,2.x 是針對php5的,請下載對應(yīng)版本。下載后解壓,easyphp或者mantis目錄下都可以,我放在我C:EasyPHP 2.0b1php5下。然后在php.ini“;extension=php_gd2.dll”前面的分號刪除,這個模塊是JPGraph在顯示圖表和進(jìn)行漢字編碼轉(zhuǎn)換是所必須的。1) 如果你的界面語言是用簡體中文或者繁體中文,那么你會看到圖形中的漢字都是亂碼,這是因?yàn)镸antis對于JPGraph的編碼設(shè)置不正確造成的。 JPGraph會自動將漢字轉(zhuǎn)換為UTF-8編碼,但是需要在調(diào)用JPGraph的時候?qū)?biāo)題等SetFont,Mantis沒有做這個操作,因此漢字顯示出來都是亂碼。解決方法是增加對圖形設(shè)置字體的代碼;
1) 打開$mantiscoregraph_api.php,查找:graph_get_font(),在其中添加一行

'chinese_gbk' => FF_SIMSUN,
2) 在config_inc.php文件中添加
$g_graph_font = 'chinese_gbk';

3) 打開$JPGraphsrcjpg-config.inc.php
查找 DEFINE('CHINESE_TTF_FONT','bkai00mp.ttf');
改為 DEFINE('CHINESE_TTF_FONT','simsun.ttc');
jpg-config.inc.php也可以不改,如果生成的圖形中的字體想由自己定義,可以這樣改。
這個時候,如果你選擇的語言是chinese_simplified,現(xiàn)在你的圖形報表應(yīng)該可以顯示中文了。
4) 但如果你選擇語言跟我一樣是chinese_simplified_utf8,則發(fā)現(xiàn)報表顯示還是亂碼。

原來JPGraph中處理的時候比較bt,只要看到字體設(shè)置是FF_SIMSUN,認(rèn)為字符串編碼是GB2312,輸出的時候都要轉(zhuǎn)成UTF8,
單實(shí)際上已經(jīng)是UTF8了,根本不用轉(zhuǎn)。
直接修改代碼:
打開JPGraph下的jpgraph.php文件,搜索其中:
elseif( $aFF === FF_SIMSUN ) {
// Do Chinese conversion

if( $this->g2312 == null ) {
include_once 'jpgraph_gb2312.php' ;
$this->g2312 = new GB2312toUTF8();
}
return $this->g2312->gb2utf8($aTxt);
}
改為:
elseif( $aFF === FF_SIMSUN ) {
// Do Chinese conversion
/*
if( $this->g2312 == null ) {
include_once 'jpgraph_gb2312.php' ;
$this->g2312 = new GB2312toUTF8();
}
return $this->g2312->gb2utf8($aTxt);
*/
return $aTxt;
}
是把轉(zhuǎn)換編碼的代碼注釋掉,好不要直接刪掉了,不然以后想改回來麻煩了。這樣改實(shí)際是有些問題,如果mantis中有部分用戶的語言選擇為chinese_simplified,另一部分選擇為chinese_simplified_utf8不行了,總會有部分人報表出現(xiàn)亂碼。所以一個小組一定要統(tǒng)一阿:-) 目前圖形報表中文顯示應(yīng)該沒有問題了。

(3)使用郵件可以下載 phpmailer-1.73 ,下載地址為http://sourceforge.net/project/showfiles.php?group_id=26031。我也安裝在easyphp的php目錄下,郵件的設(shè)置大概是讓人頭疼的的了,,我也是調(diào)了N次,反反復(fù)復(fù),記住要修改$ g_return_path_email ='fanxin1029@163.com';為有效地址!我在設(shè)置郵件是碰到了和這為老兄一樣的問題 have installed mantis and done the installation check. Everything seems to be ok. I click the send email button to check my config. Mantis tells me that the email was sent successfully but I get nothing. Can someone help? 是測試郵件發(fā)送成功,但是是收不到郵件!
Here are my settings:

# select the method to mail by:
# 0 - mail()
# 1 - sendmail
# 2 - SMTP
$g_phpMailer_method = 1;

# This option allows you to use a remote SMTP host. Must use the phpMailer script
# Name of smtp host, needed for phpMailer, taken from php.ini
$g_smtp_host = 'localhost';

phpMailer_method = 1, uses the internal mail function in PHP to send the message. I believe that it waits until the message is sent before returning success or failure.

phpMailer_method = 2, uses the sendmail program to send the message. It opens a socket and transferrs the message locally. It does not wait until the message is sent before returning success or failure. Thus the mail logs are important.
phpMailer_method = 3, uses the code in phpMailer to send the message. It waits until the message is sent before returning success or failure. It works with remote SMTP servers.
那時候我設(shè)$g_phpMailer_method = 1,周大哥(我們老板)提醒才發(fā)現(xiàn)自己范了很菜的錯誤!
至此,如果沒有意外你可以登錄mantia了;打開ie輸入http://localhost:8088/mantis可以看到登錄界面了,,用戶名為 administrator,密碼是root,進(jìn)入后可以改密碼。語言你登陸后可以選擇成中文簡體!選擇My Account,然后選擇Preferences,找到Language,選擇下拉列表中chinese_simplified,點(diǎn)擊Updata Prefs之后重新登陸ok了。還有要?唆下我遇到的問題

上一頁123456下一頁
軟件測試工具 | 聯(lián)系我們 | 投訴建議 | 誠聘英才 | 申請使用列表 | 網(wǎng)站地圖
滬ICP備07036474 2003-2017 版權(quán)所有 上海澤眾軟件科技有限公司 Shanghai ZeZhong Software Co.,Ltd