Using Mantis to tracking defects

I am working on a project with remote people. Right now, all our communication is using e-mails including the defects tracking. It is so hard to maintain e-mail, even you can make some label and group for it, it is not enough for a project.

The bug tracking step is very important for the whole quality of software, and QA will rely on it to monitor software developing processing.

“The main benefit of a bug-tracking system is to provide a clear centralized overview of development requests (including both bugs and improvements, the boundary is often fuzzy), and their state. The prioritized list of pending items (often called backlog) provides valuable input when defining the product roadmap, or maybe just “the next release”.” I copy this paragraph from wiki(

Also I believe bug-tracking record is a big knowledge resources, we can track what happened before, the avoid or fix what we are facing now.

Considering about the remote people, we have to select a product which can support remote working, so web-based system will be the best fit.

At last, I decide to use Mantis for our tracking system.

To install it is a really happy hour. It is not so hard to install.

I use xampp to solve the  Apache, MySQL, PHP and Mercury Mail issue. You just need to install xampp by double click the installing executable file, it is really enjoyable to have such a type of integrate software. (You can get it from

Next, to install mantis in our web server, download it from

unzip to a folder, for my case I unzip in this path: D:\mantis

and set up our Directory in apache, open httpd.conf, add the following content in it

Alias /mantis "D:/mantis/"
<Directory "D:/mantis/">
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all

So that you can make mantis as your sub address of your site.

Like put localhost/mantis  in your browser address column, it will guide to mantis, be careful that you should modify D:/mantis/ to your path of mantis.

And do not forget set up your MySql root password, you can use this link to do it.


Next, I create a database name mantis for mantis using, and a account with fully privilege named mantis using phpMyAdmin

All right, next we should start to install mantis, if is not so hard, you can follow my step.

1. Unzip mantis download form  to D:/mantis which I have set it before.

2. Put localhost/mantis  in your browser address, so that browser will direct you to the mantis install page

3.install mantis

Type of Database:   MySQL(default)

Hostname (for Database Server):   localhost
Username (for Database),           the account name created before
Password (for Database)         :   the account password created before
Database name (for Database)     the database created before for my case is mantis
Admin Username (to create Database ifrequired),  MySql Admin Username mine is root
Admin Password (to create Database ifrequired):  the password
Print SQL Queries instead of Writing to theDatabase    make sure check it!

Click Install/Upgrade Database

3. All right now

Setting Database Hostname,  Setting Database Type,  Checking PHP support for database type, Setting Database Username, Setting Database Password, Setting Database Name, Setting Admin Username, Setting Admin Password, Attempting to connect to database as admin, Attempting to connect to database as user, Checking Database Server Version,  should be all GOOD in green.

But, there maybe still some BAD in Checking Installation section.

Now, what you have to do is copy all SQL commands from Installing Database Section and remove the warring information in red, and Paste them to SQL tab in mantis database

4. After doing all these, close your browser and re-open it put  http://localhost/mantis/ in address column. You can see the log in page of mantis. That means you have install mantis correctly. You can use default account to log in mantis which is :

Account Name: administrator

Password: root

Well, next what you have to do is to configure mantis.

Extra JpGraph installation:

JpGraph is useful for your summary and report in mantis to install you have to go to  to download it.

And unzip it in the root folder under mantis. Add next two lines in config_inc.php of mantis

$g_jpgraph_path= 'jpgraph/src/';

Attention, If you do not like administrator as admin account, Please do not remove the default till you have set up e-mail and create your own admin account. Or you can just change the password of the administrator for future use.

To configure e-mail function of mantis is a really high priority tasks, because without e-mail supporting you can not register user for mantis.

For my case, I use Mercury as my e-mail server. Thanks to which guide me set up my Mercury

To make it working correctly you have to do the step following:

Setup DNS for your NIC

  • Go to Start->Network Connections
  • Edit the NIC you are using
  • Double Click TCP/IP settings
  • Manually enter in the DNS servers from your ISP

Disable unneeded Protocols

  • Start Mercury from the Control Panel
  • Disable everything except the MERCURYC SMTP RELAY CLIENT and MERCURYS SMTP SERVER
  • Restart Mercury

Make Changes to Core Module

  • Check to make sure “localhost” is the value of “internet name for this system”
  • Disable all but “send copies of all errors to postmaster”
  • check tab “Local Domains” make sure Localhost is there
  • Close and save

Edit MercuryS SMTP Server

  • Choose general tab and enter name as SMTP
  • Make sure port 25 is listed
  • Add to “IP interface to use”
  • Go to Connection Control and add to the list
  • Un-check “do not permit SMTP relaying to non-local mail”
  • Close and Save

Edit MercuryC SMTP Client

  • Enter in external SMTP client ( for example) on port 465 with SSL encryption using direct connection (or whatever ports are supported)
  • Enter your login name (in most case it should be the full name of e-mail address)and password to that external SMTP server
  • Close and Save

Edit PHP.INI file to include from line

  • Then go edit your PHP.INI file in XAMPP
  • Under [mail function] add the line “sendmail_from = admin@localhost
  • Stop and restart Mercury and Apache

Here is my setting of PHP.ini, I also create php_mail.log under \xampp\apache\logs to log php mail function event.

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
sendmail_from = admin@localhost

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path = "\"C:\xampp\sendmail\sendmail.exe\" -t"

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = Off

; Log all mail() calls including the full path of the script, line #, to address and headers
mail.log = "C:\xampp\apache\logs\php_mail.log"

For mantis config_inc.php, you can copy my setting, make sure to use PHPMAILER_METHOD_MAIL since if you use my way, since I rely on the main() of PHP

# --- Email Configuration ---
$g_smtp_host			= 'localhost';			# used with PHPMAILER_METHOD_SMTP
$g_smtp_username		= '';					# used with PHPMAILER_METHOD_SMTP
$g_smtp_password		= '';					# used with PHPMAILER_METHOD_SMTP
$g_administrator_email  = '';
$g_webmaster_email      = '';
$g_from_name			= 'Mantis Bug Tracker';
$g_from_email           = '';	# the "From: " field in emails
$g_return_path_email    = '';	# the return address for bounced mail
$g_email_receive_own	= OFF;
$g_email_send_using_cronjob = OFF;

Now,reset your apache, mercury, and you should have enabled the E-Mail Function of Mantis. Enjoy it. you can register and e-mail any event from Mantis.


2 thoughts on “Using Mantis to tracking defects

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s