Sunday, January 24, 2010

Setting up playground bug tracking system (Bugzilla on Win7 and IIS 7)

I have decided to improve my coding playground by setting up bug tracking system. I took a look at some open source tools and decided to install Bugzilla (http://www.bugzilla.org) which is widely used in many organizations and projects. I use Windows 7 and instead of recommended Apache server I used IIS 7.

Information on how to set up Bugzilla on windows environment can be found here: https://wiki.mozilla.org/Bugzilla:Win32Install
Most of the installation steps are quite straightforward; anyway it takes a lot of time to install and configure all the required components.

NOTE: if you plan to use smtp.gmail.com as SMTP do not install Perlx64 but Perlx86 (I could not install the required Email-Send-Gmail perl package)

There were a couple of issues during installation… The default installation of IIS 7 on Windows 7 is missing some required modules like ISAPI extensions etc. Click here for instructions how to do it.

Adding Script Modules on IIS 7 is quite different then on previous versions of IIS which goes like this: Select the virtual directory in the IIS (e.g. Bugzilla), then open feature Handler Mappings then 'Add Script Map' from context menu. Two Script Maps has to be added – for Perl and for CGI; for both choose Execute in Edit Feature Permissions.

For Perl type as follows (providing correct path)
Request path: *.pl
Executable: c:\Perl\bin\perl.exe "%s" %s
Name: Perl Script Map
Press 'OK'
Say 'YES' to ISAPI message

And the CGI:
Request path: *.cgi
Executable: c:\Perl\bin\perl.exe -xc:\bugzilla -wT "%s" %s
Name: CGI Script Map
Press 'OK'
Say 'YES' to ISAPI message

After running "checksetup.pl" from <BugzillaFolderPath> I got notifications about some missing required Modules so I had to execute following commands and again run checksetup.pl

ppm install DateTime
ppm install DateTime-TimeZone
ppm install Template-Toolkit
ppm install Email-Send
ppm install Email-MIME
ppm install Email-MIME-Encodings
ppm install Email-MIME-Modifier

Now, after executing 'checksetup.pl' the localconfig file was created and has to be updated with correct mySQL db_pass and db_port information

Since Bugzilla requires an SMTP to function on Windows another problem occurred because SMTP/POP service is not included in Win 7 J I have used smtp.gmail.com since I have an account there… however it does not work!

Gmail uses TSL protocol and to make it work some hack is required as described here.

After providing the necessary information you should be able to access http://localhost/Bugzilla or whatever name you have chosen for the virtual directory in IIS.