您的位置:軟件測(cè)試 > 開(kāi)源軟件測(cè)試 > 開(kāi)源Bug管理工具 > Mantis
Mantis的安裝配置-Windows與使用
作者:網(wǎng)絡(luò)轉(zhuǎn)載 發(fā)布時(shí)間:[ 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)
如果要使用圖形報(bào)表,要下載jpgraph目前新版本是jpgraph-1.21b.tar.gz?梢栽趆ttp: //www.aditus.nu/jpgraph/jpdownload.php下載新版的JPGraph,請(qǐng)注意JPGraph 1.x 版本是針對(duì)php4,2.x 是針對(duì)php5的,請(qǐng)下載對(duì)應(yīng)版本。下載后解壓,easyphp或者mantis目錄下都可以,我放在我C:EasyPHP 2.0b1php5下。然后在php.ini“;extension=php_gd2.dll”前面的分號(hào)刪除,這個(gè)模塊是JPGraph在顯示圖表和進(jìn)行漢字編碼轉(zhuǎn)換是所必須的。1) 如果你的界面語(yǔ)言是用簡(jiǎn)體中文或者繁體中文,那么你會(huì)看到圖形中的漢字都是亂碼,這是因?yàn)镸antis對(duì)于JPGraph的編碼設(shè)置不正確造成的。 JPGraph會(huì)自動(dòng)將漢字轉(zhuǎn)換為UTF-8編碼,但是需要在調(diào)用JPGraph的時(shí)候?qū)?biāo)題等SetFont,Mantis沒(méi)有做這個(gè)操作,因此漢字顯示出來(lái)都是亂碼。解決方法是增加對(duì)圖形設(shè)置字體的代碼;
1) 打開(kāi)$mantiscoregraph_api.php,查找:graph_get_font(),在其中添加一行

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

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

原來(lái)JPGraph中處理的時(shí)候比較bt,只要看到字體設(shè)置是FF_SIMSUN,認(rèn)為字符串編碼是GB2312,輸出的時(shí)候都要轉(zhuǎn)成UTF8,
單實(shí)際上已經(jīng)是UTF8了,根本不用轉(zhuǎn)。
直接修改代碼:
打開(kāi)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)換編碼的代碼注釋掉,好不要直接刪掉了,不然以后想改回來(lái)麻煩了。這樣改實(shí)際是有些問(wèn)題,如果mantis中有部分用戶(hù)的語(yǔ)言選擇為chinese_simplified,另一部分選擇為chinese_simplified_utf8不行了,總會(huì)有部分人報(bào)表出現(xiàn)亂碼。所以一個(gè)小組一定要統(tǒng)一阿:-) 目前圖形報(bào)表中文顯示應(yīng)該沒(méi)有問(wèn)題了。

(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è)置郵件是碰到了和這為老兄一樣的問(wèn)題 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? 是測(cè)試郵件發(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í)候我設(shè)$g_phpMailer_method = 1,周大哥(我們老板)提醒才發(fā)現(xiàn)自己范了很菜的錯(cuò)誤!
至此,如果沒(méi)有意外你可以登錄mantia了;打開(kāi)ie輸入http://localhost:8088/mantis可以看到登錄界面了,,用戶(hù)名為 administrator,密碼是root,進(jìn)入后可以改密碼。語(yǔ)言你登陸后可以選擇成中文簡(jiǎn)體!選擇My Account,然后選擇Preferences,找到Language,選擇下拉列表中chinese_simplified,點(diǎn)擊Updata Prefs之后重新登陸ok了。還有要?唆下我遇到的問(wèn)題

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