Install Bugzilla on Shared Hosting

15 Aug 2013
Posted by Kiran

Though I work with an IT major, my time at work is mostly spent on Microsoft Outlook and Excel and rarely do I get to get my hands dirty with actual code. Hence, as a hobby, I spend time building some applications in my spare time and that helps me keep in touch with coding.

I recently embarked upon a project to build a Drupal module of sizeable proportions. As I worked on it, I soon found that ideas were flowing and bugs were being discovered faster than I could keep track of them. I realized that if I was to do any serious — even if informal — development, a Project Management/Bug Management software was essential.

Having heard quite a bit about Bugzilla, I set out to install an instance for my own personal use. As it turns out getting Bugzilla working is not for the faint of heart.

The initial steps to setup Bugzilla are the same as those documented in the Bugzilla Documentation. However, here are some aspects of the installation that finally got Bugzilla working on my Shared hosting account:

 

1. Ensure all Perl modules are installed
After you have run:

./checksetup.pl --check-modules

you will receive a set of Perl modules that need to be installed. The script also provides you with the command that needs to be run to install each of those required modules.

For example, to install the DateTime module, run:

/usr/bin/perl install-module.pl DateTime

2. Use suexec
Once all Perl modules have been installed, you will rerun checksetup.pl. This time, it will create a localconfig file which you will edit to put in details of the Database, User and Password.

Here, you must also change $use_suexec=0 to $use_suexec=1.

Once this is done, and you have rerun checksetup.pl once more, the installation should be complete.

3. Edit Bugzilla.pm
If you use a shared hosting account to host your Bugzilla instance, chances are that any user-installed Perl modules sit in a location different from /usr/local or /usr/lib. This could lead to errors similar to:

Can't locate Date/Format.pm in @INC (@INC contains: . lib/x86_64-linux-thread-multi lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at Bugzilla/Error.pm line 21.
BEGIN failed--compilation aborted at Bugzilla/Error.pm line 21.
Compilation failed in require at Bugzilla/Install/Filesystem.pm line 21.
BEGIN failed--compilation aborted at Bugzilla/Install/Filesystem.pm line 21.
Compilation failed in require at Bugzilla/Config.pm line 15.
BEGIN failed--compilation aborted at Bugzilla/Config.pm line 15.
Compilation failed in require at Bugzilla.pm line 21.
BEGIN failed--compilation aborted at Bugzilla.pm line 21.
Compilation failed in require at index.cgi line 19.
BEGIN failed--compilation aborted at index.cgi line 19.

This error typically indicates that Perl running via the webserver could not locate the necessary Perl libraries to run the CGI script. In a Unix shell, Perl searches for libraries within the paths that are part of the $PERL5LIB environment variable. However, environment variables available to us on Shell are not the same in the web environment. Hence, changing this environment variable doesn't help solve such errors.

To get around this problem, you can use the which or find Unix shell commands to find the actual path where this library or file is located.

If the file Format.pm can be found anywhere within the $PATH, it could be found by running:

which Format.pm

If there is a specific location within the user's home directory where user-installed Perl libraries are installed, you could try running:

cd /home/user
find . -name Format.pm

Once, you have found the path where the Perl library/file is available, you should include that path in the @INC that Perl uses to find libraries. This can be done by editing the file Bugzilla.pm to introduce the lines such as:

  1. use lib qw(. /home/user/lib/perl5/);
  2. use lib qw(. /home/user/lib/perl5/share/perl5/);
  3. use lib qw(. /home/user/lib/perl5/lib64/perl5/);

after the line use strict;. Here you will need to replace the paths such as /home/user/lib/perl5/ to point to the location you have identified earlier.

This solves the problem with the libraries not being found. You may have to redo these steps for every library that Bugzilla reports as missing.

4. Use DateTime library
Another error I faced in my Bugzilla Installation was when I tried to setup Whining via the Administration interface. Here, I got an error stating:

Can't locate object method "now" via package "DateTime" at editwhines.cgi line 386.

I solved this error by introducing one more line into Bugzilla.pm:

  1. use DateTime;

This solves the problem and gets Bugzilla working!

5. Disable Caching
You might also want to consider disabling caching on your Bugzilla installation. I found it particularly useful if you have multiple developers, with different levels of access, working together and possibly sharing computers. You can do this by editing your .htaccess and introducing the following lines:

FileETag None
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"

These lines should go inside the <IfModule mod_headers.c> and </IfModule> segments.

 

I hope that the above steps help you in getting a working instance of Bugzilla on your shared hosting account. However, since Bugzilla is a complex system you could well face errors not faced by me since every system and every webhosting account is different. Do leave a comment if you have encounterd any other issue and if you have already managed to solve it, do let us know how you did that.

Reply to comment | Kiran J. Holla

Designed to push yoou to buy in-game currency and products by making players wait for
new cards and leveling up opportunities. Challengers will have better
cards, resulting inn quihk defeats, unless you spend cash to update to comparable levels or wait weeks to earn enough resources.

my web pag clash royale glitch


Reply to comment | Kiran J. Holla

I would like to take the ability of saying thanks to
you for the professional assistance I have continually enjoyed checking out your site.
I am looking forward to the commencement of my university research and the
complete preparation would never have been complete without consulting this
site. If I can be of any help to others, I will be glad to help by means of what I have discovered from here.

my website jasa foto prewedding solo


Reply to comment | Kiran J. Holla

Would love to constantly get updated great web site!

my web site sewa mobil di solo


Reply to comment | Kiran J. Holla

It's a shame you don't have a donate button! I'd without a doubt
donate to this excellent blog! I suppose for now i'll settle for
bookmarking and adding your RSS feed to my Google account.

I look forward to fresh updates and will talk about this blog with my Facebook group.
Talk soon!

my page sewa avanza bali


Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options