Installing MantisBT On a PHP/MySQL Web Server: A Tale of Tears, Tenacity, and Triumph

Alex M. Smith
Jul 10, 2017 · 7 min read

Keywords: linux, mantisbt, bug, issue, tracking, web, collaboration, team, hosting, server, terminal, github, 000webhost, free, debug, yonder, dynamics, jira, composer, json, vim, filezilla, ftp, php, mysql, postgresql, http, css

This is my first foray into blogging/tech reporting. Constructive critique is very much welcomed.

Sunday, July 9th, 2017 // 14:35 // Better Buzz Coffee, Pacific Beach, CA

The Need

As coach and former software lead for the UC San Diego robotics team Yonder Dynamics, I am driven to help this year’s software group adopt helpful new standards, platforms, and development procedures. One of my aims is to introduce members to proper issue tracking software, which allows one to report on project bugs and to-do items. Good issue tracking software also supports scheduling and assignment, allowing users to delegate bug fixes and deadlines to other individuals, as well as make notes on their progress.

The immediate solution: JIRA. An industry standard, this issue tracking software by Atlassian often shows up in many software job listings (hence my familiarity). However, JIRA is paid software, something rather inconvenient for a team that’s strapped for cash.

So my first task: find free issue tracking software.

Based off of a recommendation by Cai Yeo (EE Lead for Yonder Dynamics), I opt for MantisBT, a free open source tool for bug tracking and collaboration.

An example of MantisBT hosted by Cai Yeo.

It’s a fantastic piece of software with a pleasing interface. Within minutes, I’m assigning, viewing, and making notes on issues.

Now what?

Well — now that I had a bug issue tracker software, I need a place to host it for my teammates. I’m not going to run it on my laptop 24–7, after all.

First, I make a list of my software requirements. According to the MantisBT system requirements, I need a server that supports PHP and MySQL (or PostgreSQL).

My gut reaction: make a github.io page. “Pages” is a free web hosting service by GitHub. However, after researching their server information, I find this:

Damn.

With GitHub Pages off the table, I then consider the web host we use for our team’s website: Squarespace. From their support FAQ:

SQL — more like SOL. 0 for 2.

0 for 2. I resort to man’s second best friend (Google) and find several good reviews on a free PHP and MySQL hosting service: 000webhost.

Annoying URL for now— but 000webhost allows you to choose from a list of free domains. Just check your settings.

I’ve found my host. Now what?

Now I need to install MantisBT on the server. Well, if you can, check first to see if your file manager (i.e. cPanel) allows you to install MantisBT with a tool such as Softaculous. If not, we’ll do install it ourselves.

First, I download the latest version of MantisBT from github.

I then go to my file manager on 000webhost:

Currently empty website.

Clicking on “upload files,” I see that I can only upload individual files, and not folders. This is inconvenient — I want to only upload the a “mantisbt” folder containing all of my files. I decide to use an FTP client. After a quick install on my Linux machine:

$ sudo apt-get install filezilla

I now have FileZilla, a free FTP solution. At the top of FileZilla is a prompt: host name, username, and password.

To find these, I access my settings on 000webhost:

Convenient. Right at the top.

I type them into my FileZilla and connect.

(slides up glasses) I’m in.

I navigate to my mantisbt folder in my Linux’s file system, and simply drag it into the public_html.

Files transferring.

This will take a few minutes. Checking my file manager:

“IT’S WORKING…IT’S WORKING!!!” — Darth Vader

I then followed the instructions on MantisBT’s website, visiting my website’s (url)/mantisbt/admin/install.php file in my browser. Before doing this, make sure your website is published. If you’re still getting the “build your website” setup page on 000webhost, go ahead and click “I’ve already built my website!” at the bottom of the page.

Enter the debugging stage.

If the above instructions brought you to the MantisBT login page, congratulations. Otherwise, you may have run into a similar error as I did:

…what?

Failed to open stream: No such file or directory […] mantisbt/vendor/autoload.php.

Taking a quick look inside of the mantisbt folder confirms that the vendor/ folder doesn’t exist. Spooky. Time for the forums.

After a brief period of googling and forum hopping, I find this issue thread. It appears that the problem is with mantisbt/composer.json. I open my Linux terminal and navigate to the mantisbt folder.

$ sudo apt-get install composer && sudo composer install

What.

After a momentary spike of disbelief, I realized I hadn’t yet installed PHP on my Linux computer.

$ sudo apt-get install php

I now have PHP, with no change to the problem.

I observe that the main issue is with dapphp/securimage in the composer.json file.

I remove line 12.

$ sudo composer update

I get another error, this time for phpunit. I remove the corresponding line in composer.json, and try again.

Success!

I quickly check my mantisbt folder, and sure enough, the vendor folder now exists, with the autoload.php file I need.

Phew.

I go back to FileZilla, deleting and re-uploading everything, just to be sure. Crossing my fingers, I visit (my url)/mantisbt/admin/install.php in my browser.

We’re golden.

Celebrating internally, butt aching from the wood chair in this small albeit cute coffee house, we continue.

Installation Options

Fill in the fields for Username, Password, Admin Username, Admin Password. Set your timezone. Click “Install/Upgrade Database.”

Bug #2

So close. Why can’t anything go smoothly?

It appears that an error is occurring when connecting to the database. I revisit the MantisBT install documentation:

I try different combinations of hostnames, usernames, and passwords, and can’t seem to get past this error. I’m getting an “access denied” error, which means I’m either accessing the server with the wrong credentials, or accessing the wrong server (at the wrong hostname). Does my MySQL server even exist?

I navigate to the “Manage database” icon in my 000webhost panel. Sure enough, I need to create a MySQL database. I click “New Database” and input a desired username, server name, and password.

Creating database.

I then use the DB Name and DB User along with “localhost” in my install.php web browser page. I leave the Admin user/passwords blank.

SUCCESS!

Click “Continue.”

I’m not crying.

CAPTCHA

Nearly there. Upon signing up for a new account, I run into this issue:

captcha won’t load.

According to this thread, I need to disable captcha inside of the mantisbt/config/config_inc.php file. I added the following line:

$g_signup_use_captcha = OFF;

And I re-upload using FileZilla.

No CAPTCHA required.

Enter info, click “Signup”:

Oh look. Tears.

After clicking the verification link in my email, I achieve victory.

All done.

Next step? Harangue teammates. This tribulation will not go unrewarded.

Cheers!

Alex M. Smith

Written by

Software Developer, Aerospace

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade