August 31, 2012

Bugzilla - How to add a custom field?

Steps to Add the Custom Field in Bugzilla:

Go to Administration link
Click on the Custom Fields link
Click on the Add a new custom field
Enter the Field Value based on the Requirements.
Click on create.
You can also specify that the Custom Field should appear only for selected product.
The New custom field will appear in the new defect

Bugzilla 4.0.3 Installation / Configuration

Bugzilla 4.0.3 Installation:

Download Bugzilla from the Bugzilla download page (2.9 MB).
Bugzilla ships as a Tarball, which has the extension .tar.gz. Any decent Windows archive tool should be able to extract tarballs.
Extract the archive to the directory of your choice. For the remainder of this document I will assume that you have extracted Bugzilla into C:\Bugzilla.

MySQL Installation:

Download MySQL

Download the MySQL 32-bit or 64-bit MSI installer from the MySQL website (28 MB).


MySQL has a standard Windows installer. It's ok to select a Typical MySQL install (the default). But for changing the installation directory, select Custom and change path
Example: MySQL installation path to C:\MySQL5.5 and Data Path to E:\MySQL5.5\Data

Run the Configuration Wizard at the end of the installation and configure the following
·         Select Install As Windows Service
·         Select Include bin directory in Windows PATH
·         Modify Security Settings
o    Set Root Password (MySQL)
For the remainder of this document I will assume you have installed MySQL into C:\mysql.
Now change a few settings. Goto C:\mysql\my.ini.
# If max_allowed_packet is set  to 4M. Underneath that, add the following line:
ft_min_word_len = 2
Otherwise add the following lines at the end of my.ini file
ft_min_word_len = 2

Launch the MySQL Command Prompt and enter the root password and enter the following

mysql> GRANT ALL PRIVILEGES ON bugs.* TO 'bugs'@'localhost' IDENTIFIED BY 'abcbugs';
Query OK, 0 rows affected (0.03 sec)
mysql> quit 

ActiveState Perl

Download ActiveState Perl

Download the ActiveState Perl 5.12.4 or higher MSI installer from the ActiveState website.
Note that Bugzilla currently requires Perl 5.8.1 or higher, but it's highly recommended to install ActivePerl 5.12 or higher. Bugzilla 4.2 will be the last version to support Perl 5.8.x. The next release will require Perl 5.10.1 or better. Also, there are several bugs in Perl 5.8.x which have been fixed in 5.10.1 and 5.12.


ActiveState Perl uses a standard Windows Installer. Install, sticking with the defaults, which will install Perl into C:\Perl.
Note: Installing Perl into a directory that contains a space (eg "C:\Program Files") will break the Template-Toolkit installer.
Once the install has completed, log out and log in again to pick up the changes to the PATH.

Install Perl Modules

The following are the commands and ouput for a 5.10.x perl module installation. If you don't want to use the command-line interface but prefer a nice Graphical User Interface (GUI), simply type "ppm", or look for the Perl Package Manager in the Windows Start bar.
C:\>ppm version
ppm 4.06 (ActivePerl 1006)
Copyright (C) 2009 ActiveState Software Inc. All rights reserved.
C:\>ppm repo add UWinnipeg
Downloading ActiveState Package Repository packlist...done
Updating ActiveState Package Repository database...done
Downloading UWinnipeg packlist...done
Updating UWinnipeg database...done
Repo 2 added.
C:\>ppm repo add Trouchelle
Downloading Trouchelle packlist...done
Updating Trouchelle database...done
Repo 3 added.
C:\>ppm repo list
¦ id ¦ pkgs  ¦ name                           ¦
¦ 1  ¦ 11417 ¦ ActiveState Package Repository ¦
¦ 2  ¦ 291   ¦ UWinnipeg                      ¦
¦ 3  ¦ 11737 ¦ Trouchelle                     ¦
(3 enabled repositories)
C:\>ppm upgrade
Syncing site PPM database with .packlists...done
Archive-Tar 1.54 (have 1.52-r1)
Attribute-Handlers 0.87 (have 0.86)
AutoLoader 5.70 (have 5.69)
Bit-Vector 7.1 (have 6.9)
Class-Accessor 0.34 (have 0.33)
Class-ISA 0.36 (have 0.33)
Compress-Raw-Bzip2 2.021 (have 2.020)
Compress-Raw-Zlib 2.021 (have 2.020)
DBD-ODBC 1.23 (have 1.22)
DBI 1.609 (have 1.607)
Date-Calc 5.8 (have 5.6)
Encode 2.37 (have 2.35)
ExtUtils-CBuilder 0.260301 (have 0.2603)
ExtUtils-Manifest 1.57 (have 1.56)
ExtUtils-ParseXS 2.21 (have 2.2002)
File-Path 2.08 (have 2.07_03)
File-Which 1.09 (have 1.07)
IO-Compress 2.021 (have 2.020)
IPC-Cmd 0.50 (have 0.46)
Log-Message-Simple 0.06 (have 0.04)
Math-BigRat 0.24 (have 0.22)
Module-CoreList 2.20 (have 2.17)
Module-Loaded 0.06 (have 0.02)
Object-Accessor 0.36 (have 0.34)
Safe 2.19 (have 2.17)
Test-Simple 0.94 (have 0.92)
Text-CSV_XS 0.68 (have 0.67)
Text-Reform 1.20 (have 1.11)
constant 1.19 (have 1.18)
parent 0.223 (have 0.221)
version 0.7702 (have 0.7701)
C:\>ppm install AppConfig
Downloading AppConfig-1.66...done
Unpacking AppConfig-1.66...done
Generating HTML for AppConfig-1.66...done
Updating files in site area...done
14 files installed
C:\>ppm install TimeDate
Downloading TimeDate-1.19...done
Unpacking TimeDate-1.19...done
Generating HTML for TimeDate-1.19...done
Updating files in site area...done
41 files installed
C:\>ppm install DBI
No missing packages to install
C:\>ppm install DBD-mysql
Downloading DBD-mysql-4.011...done
Unpacking DBD-mysql-4.011...done
Generating HTML for DBD-mysql-4.011...done
Updating files in site area...done
12 files installed
C:\>ppm install Template-Toolkit
Downloading Template-Toolkit-2.22...done
Unpacking Template-Toolkit-2.22...done
Generating HTML for Template-Toolkit-2.22...done
Updating files in site area...done
140 files installed
C:\>ppm install MailTools
Downloading MailTools-2.04...done
Downloading Test-Pod-1.40...done
Unpacking MailTools-2.04...done
Unpacking Test-Pod-1.40...done
Generating HTML for MailTools-2.04...done
Generating HTML for Test-Pod-1.40...done
Updating files in site area...done
43 files installed
C:\>ppm install GD
No missing packages to install
C:\>ppm install Chart
Downloading Chart-2.4.1...done
Unpacking Chart-2.4.1...done
Generating HTML for Chart-2.4.1...done
Updating files in site area...done
16 files installed
C:\>ppm install GDGraph
Downloading GDGraph-1.44...done
Unpacking GDGraph-1.44...done
Generating HTML for GDGraph-1.44...done
Updating files in site area...done
21 files installed
C:\>ppm install PatchReader
Downloading PatchReader-0.9.5...done
Unpacking PatchReader-0.9.5...done
Generating HTML for PatchReader-0.9.5...done
Updating files in site area...done
12 files installed
C:\>ppm install Net-LDAP-Express
Downloading Net-LDAP-Express-0.11...done
Downloading perl-ldap-0.39...done
Downloading Convert-ASN1-0.22...done
Unpacking Net-LDAP-Express-0.11...done
Unpacking perl-ldap-0.39...done
Unpacking Convert-ASN1-0.22...done
Generating HTML for Net-LDAP-Express-0.11...done
Generating HTML for perl-ldap-0.39...done
Generating HTML for Convert-ASN1-0.22...done
Updating files in site area...done
103 files installed


It is recommended that you run Bugzilla with the Apache web server. If you want to use IIS to run Bugzilla, there are configuration instructions in the Bugzilla documentation.

Download Apache 2.x

Download the Apache HTTP Server version 2.2.x or higher from:


Yet another standard Windows Installer. Just follow the prompts, making sure you Install for All Users. Be aware the Apache will always install itself into an Apache2 directory under what ever path you specify. The default install path will be displayed as C:\Program Files\Apache Group which will result in Apache being installed to C:\Program Files\Apache Group\Apache2. This gets me every time.
For the remainder of this document I will assume you installed Apache into the default location, C:\Program Files\Apache Group\Apache2.
If you are already running IIS, you must configure apache to run on a port other than 80, however you aren't asked the port to listen on at install time. Choose All Users (which says port 80), and we'll change the port later.
By default Apache installs itself to run as the SYSTEM account. For security reasons it's better the reconfigure the service to run as an Apache user. Create a user (say apacheuser and pwd – P@ssw0rd) that is a member of no groups, and reconfigure the Apache2 service to run as that account.

Grant write access for Apache account

By default Apache will run as the SYSTEM account. This account needs write and modify access to the following directorys, and all their subdirectories. Depending on your version of Windows, this access may already be granted.
  • C:\Bugzilla\data
  • C:\Program Files\Apache Group\Apache2\logs
  • C:\Temp
  • C:\Windows\Temp
Note that C:\Bugzilla\data is created the first time you run

Configure Port and DocumentRoot

Edit C:\Program Files\Apache Group\Apache2\conf\httpd.conf with your favourite text editor.
To change the port that Apache runs on (listens on, or binds to), edit the Listen option.
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses (
Listen 80
Change the DocumentRoot setting to point to C:\Bugzilla. Note there are two locations in httpd.conf that need to be updated. Note you need to use / instead of \ as a path separator.
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
DocumentRoot "C:/Bugzilla"
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories). 
# First, we configure the "default" to be a very restrictive set of 
# features.  
<Directory />
   Options FollowSymLinks
   AllowOverride None
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
# This should be changed to whatever you set DocumentRoot to.
<Directory "C:/Bugzilla">

Configure CGI

To enable CGI support in Apache, you need to enable the CGI handler, by uncommenting the AddHandler cgi-script .cgi line.
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
AddHandler cgi-script .cgi
And allow .cgi scripts in the Bugzilla directory by adding the ExecCGI option. We also need to allow Bugzilla's .htaccess file to restrict access to sensitive documents by allowing it to override the defaults. This involves changing AllowOverride None to AllowOverride All.
Apache also needs to know to use Perl to execute .cgi files, via the ScriptInterpreterSource directive.
# This should be changed to whatever you set DocumentRoot to.
<Directory "C:/Bugzilla">
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
# The Options directive is both complicated and important.  Please see
# for more information.
    Options Indexes FollowSymLinks ExecCGI
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
    AllowOverride All
# Controls who can get stuff from this server.
   Order allow,deny
   Allow from all
# Tell Apache to use Perl to execute .cgi
    ScriptInterpreterSource Registry-Strict
You also should add index.cgi to the DirectoryIndex list.
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents.  The MultiViews Option can be used for the 
# same purpose, but it is much slower.
DirectoryIndex index.html index.html.var index.cgi
In order for ScriptInterpreterSource Registry-Strict to work, you also need to add an entry to the Registry so Apache will use Perl to execute .cgi files.
Create a key HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command with the default value of the full path of perl.exe with a -T parameter. For example C:\Perl\bin\perl.exe -T

Disable Logging

Unless you want to keep statistics on how many hits your Bugzilla install is getting, it's a good idea to disable logging by commenting out the CustomLog directive.
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here.  Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#CustomLog logs/access.log common

Restart Apache

Finally, restart Apache to get it pick up the changes.
C:\>net stop apache2
The Apache2 service is stopping..
The Apache2 service was stopped successfully.
C:\>net start apache2
The Apache2 service is starting.
The Apache2 service was started successfully.


    Template-GD: ppm install Template-GD
    MIME-tools: ppm install MIME-tools
    XML-Twig: ppm install XML-Twig
    RadiusPerl: ppm install RadiusPerl
    SOAP-Lite: ppm install SOAP-Lite
    JSON-RPC: ppm install JSON-RPC
    JSON-XS: ppm install JSON-XS
    Test-Taint: ppm install Test-Taint
    HTML-Scrubber: ppm install HTML-Scrubber
    Email-MIME-Attachment-Stripper: ppm install Email-MIME-Attachment-Stripper
    Email-Reply: ppm install Email-Reply
    TheSchwartz: ppm install TheSchwartz
    Daemon-Generic: ppm install Daemon-Generic
    mod_perl: ppm install mod_perl
    Apache-SizeLimit: ppm install Apache-SizeLimit
    Math-Random-Secure: ppm install Math-Random-Secure 

August 30, 2012

Why Bugzilla?

Bugzilla is a web based open source Defect tracking tool, which can be integrated with different test mangement systems.

There are whole lot of users of Bugzilla where-in they can help us to trouble shoot in case of any issues.

The bug status workflow can be Customized according to the needs by the administrator of Bugzilla.

Major companies are using Bugzilla to track bugs in their products and is highly scalable.

The whole UI can be  Customized based on organisational needs
The supporting sotwares are also free ware( MySQL Database,Perl,Apache Server).

Reports can be generated based on requirements .

Audit history is avilable for the logged defects.

Email can be configured for the defect status changes.

Security feature is Good.


Without logging in we can lookinto all the defects but the sataus cannot be changed.

It is not a easy Documention.

Software Required:

·         Bugzilla Application
·         MySQL Database
·         Perl
·         Apache Server

August 17, 2012

How to check required Space on disc using InstallScript?

At times, we need Custom Functions (over & above the InstallShield's default behaviour) to check the availability of disc space before proceeding with the installation. Here is the code sample for the same.

//  FUNCTION:   CheckRequiredSpace
//  Purpose:    Performs space requirements check for selected targetdir.
function CheckRequiredSpace()
    STRING svRequired;
    BOOL   bCheck;
    NUMBER nResult, nvTotalRequiredSpace, nvTotalAvailableSpace;
    //Get total required disk space
    nResult = FeatureGetTotalCost(MEDIA, TARGETDIR, nvTotalRequiredSpace);
    if (nResult < 0) then
          return -1;
    //Add 10000 KB as safety buffer to required space
    nvTotalRequiredSpace = nvTotalRequiredSpace + 10000;
    //Get total available disk space
    nvTotalAvailableSpace = GetDiskSpaceEx(TARGETDIR, KBYTES);
    if (nResult < 0) then
          return -1;
    //Convert nvTotalRequiredSpace to string
    NumToStr(svRequired, nvTotalRequiredSpace);
    //Check if there is enough space available
    if (nvTotalRequiredSpace > nvTotalAvailableSpace) then
            MessageBox(@CheckRequiredDiskSpace_Error + svRequired + " KB", WARNING);
            return 0;
    return 1;

This function applies to Pure InstallScript & InstallScript MSI Projects.

August 10, 2012

Subversion - Configuring LDAP Authentication

We have seen how to configure user authentication for local users in the previous article. This article focuses on configuring LDAP Authentication. The following steps are applicable once the Subversion Edge is installed / configured.
Steps to configure LDAP authentication for domain users:
To enable this option, please select “LDAP authentication against an LDAP server” checkbox under Server settings, Administration panel.
Once this is checked you’ll get following options to configure LDAP authentication
Ø  LDAP Security level: Default is “NONE” .Other options are SSL, TSL & STARTTSL. Based on availability we may change the security level. Here we are opted “NONE” as we don’t have other options.
Ø  LDAP Server Host: Provide the Host or IP address of your Active Directory server.
Ø  LDAP Server Port: Default port is “389”, it may vary depends upon each organization. Port accessibility can be verified through telnet client. The recommended approach is to verify this while configuring a fresh server.

Ø  LDAP Base DN:
Base DN:
   The DN (Distinguished Name) of the entry at which to start the search

Example of Base DN configuration:

The above entry describes,

Those who are users of Bangalore location, India of DX.DY.DZ domain will be able to authenticate from subversion to Active Directory through LDAP.

Ø  LDAP Bind DN:
The Bind operation establishes the authentication state for a connection.
Bind provides authentication service.
Typically checks the password against the user Password attribute in the named entry.

Example of Bind DN configuration:
cn=buserv, ou=service Accounts,ou=Global Operations,dc=DX,dc=DY,dc=DZ

The above entry describes to establishing connection between AD and Subversion server

Here “buserv “ account will be used to authenticate.

Ø  LDAP Bind Password: Password of “buserv”
Ø  LDAP Login Attribute : sAMAccountName ( It’s an LDAP property)
Ø  LDAP Search Scope :Sub
Ø  LDAP Filter: The subversion server will apply this filter in the login search process.
Ø  Console LDAP Authentication: Allow LDAP users to access the management console
Ø  Console LDAP Authentication Helper Port: This Apache port is used to facilitate LDAP authentication to the console with the above settings. Normally, no change is needed here
After filling all the parameters save the configuration and restart Apache server.
Please note that this will help you to create repository restriction to control anonymous access.

August 4, 2012

Subversion - Configuring Local User Authentication

Thi article will guide you to configure user authentication for local users. Further this will help you to create repository restriction to control anonymous access. The following steps are applicable once the Subversion Edge is installed / configured.
 Steps to create local user:
Ø  Login as admin user, navigate to “Users” tab.
Ø  Labels under Users Tab as follows..,
·         User List ---- User names that are already created.

·         New User---- To create new user
·         Role List---- Roles that are assigned to users.

Once the user is created, enable following option under Server settings -> Administration panel to allow local users to have access.
In the next post we will see how to configure LDAP Authentication for Domain Users.