最近因為工作的需要,必須試用Mantis以確認是否符合工作要求,所以我將自己對Mantis的特性、個人觀點、安裝心得、蒐集資料記錄下來以免自己忘記。
設定環境
- 安裝AppServ 至 C:\AppServ\
- 進入phpMyAdmin手動建立資料庫 mantis (utf8_gen)
- 修改 mysql.ini
開啟 mysql.ini 後,在 [mysqld] 內新增下列敘述後存檔。
max_allowed_packet=16M
- 修改 C:\Windows\php.ini
開啟 php.ini 後,調整下列的值:memory_limit = 30M
max_execution_time = 300
max_input_time = 600
- 重新啟動 Apache
安裝/設定Mantis
- 下載最新版的 mantis
- 解開 mantis 到 appserv 安裝路徑下的 www 目錄
- 安裝 jpgraph
- 下載arialuni.ttf字型,並移到 c:\windows\fonts\ 內
- 建立 C:\AppServ\www\mantis\jpgraph 目錄
- 下載 jpgraph-2.3.tar.gz 解開後移到 C:\AppServ\www\mantis\jpgraph
- 修改 C:\AppServ\www\mantis\jpgraph\src\jpg-config.inc.php
新增: DEFINE("TTF_DIR", "C:/windows/fonts/");
mark: //DEFINE('CHINESE_TTF_FONT','bkai00mp.ttf');
新增:DEFINE('CHINESE_TTF_FONT','arialuni.ttf'); - 修改 C:\AppServ\www\mantis\core\graph_api.php
1. 把所有FS_BOLD改成FS_NORMAL, 因為此字型不支援style bold
2. 找到 graph_get_font(), 在$t_font_map = array(...)內新增
'chinese_big5' => FF_BIG5 - 修改 C:\AppServ\www\mantis\jpgraph\src\jpgraph_ttf.inc.php
找到elseif( $aFF === FF_CHINESE ) {
if( !function_exists('iconv') ) {
JpGraphError::RaiseL(25006);
//('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).');
}
return iconv('BIG5','UTF-8',$aTxt);
變更為elseif( $aFF === FF_CHINESE ) {
/*if( !function_exists('iconv') ) {
JpGraphError::RaiseL(25006);
//('Usage of FF_CHINESE (FF_BIG5) font family requires that your PHP setup has the iconv() function. By default this is not compiled into PHP (needs the "--width-iconv" when configured).');
}
return iconv('BIG5','UTF-8',$aTxt);*/
return $aTxt;
- 修改 mantis\config_inc.php
加入以下的資訊:
//Information
$g_window_title = 'TWM Mantis System';
$g_page_title = 'Welcome to TWM Issue Tracking System';
//Language
$g_default_language = 'chinese_traditional_utf8';
//Allow anonymous login, 是否允許anonymous申請帳號, ON or OFF
$g_allow_signup = OFF;
//Mail
$g_send_reset_password = OFF; //When set to ON, Mantis will email the users their new passwords when their accounts are reset. If set to OFF, the password will be reset to blank and no e-mail will be sent. Default is ON. 若SMTP尚未設定完成, 可將此參數設成OFF, 以利User登入後自行修改密碼.
#$g_phpMailer_method = 2;
#$g_smtp_host = 'TCCEXCH01.pcdc.com.tw'; // whatever you smtp server is
#$g_smtp_username = 'xxx';
#$g_smtp_password = 'xxx';
#$g_administrator_email = '';
#$g_webmaster_email = '';
#$g_from_email = '';
#$g_stop_on_errors = ON;
#$g_email_receive_own = OFF;
#$g_validate_email = OFF;
//Session and Cookie
#$g_cookie_time_length =
//Automatically redirect after short amount of time
#$g_wait_time = //自動轉向延遲時間
//Jpgraph Package, if you want to use jpgraph function
$g_use_jpgraph = ON;
$g_jpgraph_path = 'C:/AppServ/www/mantis/jpgraph/src/' //jpgraph plug-in folder
$g_graph_font= 'chinese_big5';
//Time and Date
$g_short_date_format = 'Y-m-d';
$g_normal_date_format = 'Y-m-d H:i';
$g_complete_date_format = 'Y-m-d H:i';
putenv('TZ=CCT-8'); //使用台北時間
//File Upload
$g_file_upload_method = DISK;
$g_absolute_path_default_upload_folder = 'C:/AppServ/www/mantis/upload/'; //記得手動建立這個目錄
$g_max_file_size = 5000000; //上傳檔案最大5MB, 與php.ini有關, 若有需要記得調整php.ini內的upload_max_filesize
$g_disallowed_files = 'php,php3,phtml,html,class,java,exe,pl'; //不允許上傳的檔案類型
- 移除 C:\AppServ\www\mantis\admin 目錄
登入Mantis
- 開啟瀏覽器進入 http://localhost/mantis/admin/install.php
- 使用管理者帳號/密碼登入:administrator /root
- 個人新聞台 -- いらっしゃいませ...-《黑社會読み物小舖 - Mantis》
- Bryan手札-生活記趣-《Mantis 資料庫的備份 script》
- 《mantis的安装配置(for windows)》
達人請問一下
回覆刪除上面例子中提到 putenv('TZ=CCT-8'); //使用台北時間
因為小弟的專案有各國不同時區人參予,有可能用USER電腦的時區嗎?
加上目前用的是hosting服務不給改php.ini
(預設是抓Server的系統時間來用)
謝謝
Hi Leaven,
回覆刪除老實說我不知道,我手邊現在也沒有機器可以設定,真是抱歉!
雖然以實際使用需求來說,絕對會發生你說的情況,但你可能要自己試才能知道結果了。
但我個人認為一般的系統恐怕沒有辦法這麼設定,因為,在沒有Hosting時,那Server還是得要有一個參考的時間點啊!
時區問題在MantisBT 1.2.0rc1上有解了!
回覆刪除每個user現在有時區(城市)可以設定了^_^
不過不知為啥在1.1.X用得好好的subdomain沒法用了,煩惱中...
Hi Leaven,
回覆刪除謝謝你提供的資訊。
我今天早上有想到這個問題,我想到的解決方案也是每個user各自設定時區,只是這樣所有的時間,都必須先經過這個時區的function變化。
如果你有心得,也歡迎你提供給我喔!
先謝謝啦!
您好
回覆刪除請問達人
建立新人時
一定要把密碼寄到指定信箱去開通嗎??
我可以在建立這個新人帳號時就把密碼設定好嗎??
不然覺得有點麻煩
還有您知道如何大量的匯入帳號密碼的方法嗎??
謝謝
Hi baminliu,
回覆刪除如果你想要在「建立這個新人帳號時就把密碼設定好」的話,可能要去修改一下reg*.php(詳細的檔名我忘了)這個程式,裏面可以設定default的密碼,等到登入時再自行變更,不過,你可能要去找一下。
另外,如果想要大量的匯入帳號密碼,可以透過phpmyadmin,先寫好SQL script一次執行,就能達到這個效果。
當然,使用這個方法就能把設定Default Password的功能一起作到。
您好:
回覆刪除我使用預設的帳號/密碼登入:administrator /root
但一直無法登入,都已經到最後一步了,就是登入不進去,
請問可能是什麼問題呢?
謝謝喔
Hi 蘋果C:
回覆刪除目前我手邊沒有機器可以試,恐怕目前沒有辦法幫助你。
$g_default_timezone = 'Asia/Taipei';
回覆刪除設定時區,即可抓取本機的系統時間