BugFree是借鑒微軟的研發流程和Bug管理理念,使用PHP+MySQL獨立寫出的一個Bug管理 系統。簡單實用、免費并且開放源代碼(遵循GNU GPL)。
Bugfree的安裝:引用文檔http://www.cnblogs.com/emilyzhang68/archive/2011/08/24/2152433.html ,下面是對該文檔的補充說明:
以管理員身份安裝xampp,安裝到尾聲的時候會詢問是否設置為服務(方便每次開機自動運行),選擇Yes。
接著,xampp的設置腳本會啟動,完成后提示是否成功。最后提示是否現在啟動xampp control panel。點擊Yes,出現下圖:

我使用的是xampp-win32-1.8.2-3-VC9-installer,如果apache為啟動,如果是80端口被占用,直接改端口,鼠標點擊上面的config按鈕,打開相應的conf文件修改其他端口,然后重啟服務。
如果已經安裝過mysql、php等,請不要勾選,否則會出現問題。
Openssl也不是必須安裝的,如果使用https,必須要安裝openssl,openssl的64位要自己編譯,采用vs的64位命令行工具,首先要下載ActivePerl,可到http://www.activestate.com/ActivePerl,再下載openssl;用vs的64位命令行工具,切換到openssl的目錄下,執行下面的命令:perl Configure VC-WIN64A ms\do_win64a nmake -f ms\ntdll.mak,切記要使用vs64位命令行工具。如下圖所示:

安裝xampp后,將bugfree的安裝包解壓到xampp的htdocs目錄下,完整的目錄是
C:\xampp\htdocs\bugfree,將bugfree目錄下的Config.inc.Sample.php復制一份,改名為Config.inc,其中,25行以下這幾行是關于數據庫的設置,如果安裝過mysql,在這里設置一下數據庫連接的密碼、用戶名等
/* 3. Define the username and password of the BugFree database. */
$_CFG['DB']['User'] = 'root';
$_CFG['DB']['Password'] = '1234';
$_CFG['DB']['Host'] = 'localhost';
$_CFG['DB']['Database'] = 'bugfree2';
$_CFG['DB']['TablePrefix'] = 'bf_';
$_CFG['DBCharset'] = 'UTF8';
如果安裝過mysql,出現上面的mysql數據庫未激活,不用理會,但是上面的數據庫連接設置參數一定要設置,否則無法安裝bugfree。

訪問https://localhost/xampp/bugfree,如果報以下錯誤:Fatal error: Call-time pass-by-reference has been removed in,意思是調用時引用傳參已經被移除了,
就是不能通過function(&$a)這種方式傳參調用函數. 以前的php代碼在升級到5.4版本的php可能會出現這種錯誤:改正方法,調用時直接傳參就行了: foo($var) .這個錯誤出現的文件名:include下的class目錄的XmlParse.classphp,一下是我修改過的php文件。
1 <?php
2 error_reporting(E_ERROR | E_PARSE);
3
4 function & XML_unserialize(&$xml){
5 $xml_parser = new XML();
6 $data = &$xml_parser->parse($xml);
7 $xml_parser->destruct();
8 return $data;
9 }
10
11 function & XML_serialize(&$data, $level = 0, $prior_key = NULL){
12 if($level == 0){ ob_start(); echo '<?xml version="1.0" ?>',"\n"; }
13 while(list($key, $value) = each($data))
14 if(!strpos($key, ' attr')) #if it's not an attribute
15 #we don't treat attributes by themselves, so for an emptyempty element
16 # that has attributes you still need to set the element to NULL
17
18 if(is_array($value) and array_key_exists(0, $value)){
19 XML_serialize($value, $level, $key);
20 }else{
21 $tag = $prior_key ? $prior_key : $key;
22 echo str_repeat("\t", $level),'<',$tag;
23 if(array_key_exists("$key attr", $data)){ #if there's an attribute for this element
24 while(list($attr_name, $attr_value) = each($data["$key attr"]))
25 echo ' ',$attr_name,'="',htmlspecialchars($attr_value),'"';
26 reset($data["$key attr"]);
27 }
28
29 if(is_null($value)) echo " />\n";
30 elseif(!is_array($value)) echo '>',htmlspecialchars($value),"</$tag>\n";
31 else echo ">\n",XML_serialize($value, $level+1),str_repeat("\t", $level),"</$tag>\n";
32 }
33 reset($data);
34 if($level == 0){ $str = &ob_get_contents(); ob_end_clean(); return $str; }
35 }
36
37 class XML{
38 var $parser; #a reference to the XML parser
39 var $document; #the entire XML structure built up so far
40 var $parent; #a pointer to the current parent - the parent will be an array
41 var $stack; #a stack of the most recent parent at each nesting level
42 var $last_opened_tag; #keeps track of the last tag opened.
43
44 function XML(){
45 $this->parser = &xml_parser_create();
46 xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false);
47 xml_set_object($this->parser, $this);
48 xml_set_element_handler($this->parser, 'open','close');
49 xml_set_character_data_handler($this->parser, 'data');
50 }
51 function destruct(){ xml_parser_free($this->parser); }
52 function & parse(&$data){
53 $this->document = array();
54 $this->stack = array();
55 $this->parent = &$this->document;
56 return xml_parse($this->parser, $data, true) ? $this->document : NULL;
57 }
58 function open(&$parser, $tag, $attributes){
59 $this->data = ''; #stores temporary cdata
60 $this->last_opened_tag = $tag;
61 if(is_array($this->parent) and array_key_exists($tag,$this->parent)){ #if you've seen this tag before
62 if(is_array($this->parent[$tag]) and array_key_exists(0,$this->parent[$tag])){ #if the keys are numeric
63 #this is the third or later instance of $tag we've come across
64 $key = count_numeric_items($this->parent[$tag]);
65 }else{
66 #this is the second instance of $tag that we've seen. shift around
67 if(array_key_exists("$tag attr",$this->parent)){
68 $arr = array('0 attr'=>&$this->parent["$tag attr"], &$this->parent[$tag]);
69 unset($this->parent["$tag attr"]);
70 }else{
71 $arr = array(&$this->parent[$tag]);
72 }
73 $this->parent[$tag] = &$arr;
74 $key = 1;
75 }
76 $this->parent = &$this->parent[$tag];
77 }else{
78 $key = $tag;
79 }
80 if($attributes) $this->parent["$key attr"] = $attributes;
81 $this->parent = &$this->parent[$key];
82 $this->stack[] = &$this->parent;
83 }
84 function data(&$parser, $data){
85 if($this->last_opened_tag != NULL) #you don't need to store whitespace in between tags
86 $this->data .= $data;
87 }
88 function close(&$parser, $tag){
89 if($this->last_opened_tag == $tag){
90 $this->parent = $this->data;
91 $this->last_opened_tag = NULL;
92 }
93 array_pop($this->stack);
94 if($this->stack) $this->parent = &$this->stack[count($this->stack)-1];
95 }
96 }
97 function count_numeric_items(&$array){
98 return is_array($array) ? count(array_filter(array_keys($array), 'is_numeric')) : 0;
99 }
100
101 ?>
102
錯誤:php Only variables should be passed by reference in,參數是引用傳遞的,5.3以上默認只能傳遞具體的變量,而不能通過函數返回值
原來代碼:$ProjectInfo = array_pop(testGetProjectList("ProjectID = '{$ProjectID}'"));
改正后的------ FuncModel.inc.php 46行
$Result = testGetProjectList("ProjectID = '{$ProjectID}'");
$ProjectInfo = array_pop($Result);