Everyday Coder

eve·ry·day cod·er [ev-ree-dey koh-der, noun]
a person who designs, writes and tests computer programs daily

BambooInvoice Installed

I do some free-lance development work and decided I needed some software to help me bill/invoice my clients. But just as important, I needed to keep history so that when tax time comes around, I have a record of all the clients I've billed and all the payments I've received. I did a google search for "invoice software open source" and thought I'd test drive the first one on the list: BambooInvoice.

Just from the looks of the website, I thought I was in luck. Someone obviously put some time in designing and branding a nice product. I quickly discovered, however, that this open source project didn't seem to have an obvious link to its source code repository. I also noticed that there was no "Bugs are here" link to let me see/report bugs. There was a link to a forum on the front page, so I assumed it was all tracked there. I pushed forward.

First, I downloaded the zip file and unzipped it in a tmp folder. I was immediately rubbed the wrong way. I noticed in the unzip output that 2 folders were created, bambooinvoice, as expected and __MACOSX. No worries, I took care of the bogus resource files:
rm -rf __MACOSX
Then, I did an ls... Ugh, every file is listed in blue text with a bright green background which, on my terminal, means that the permissions are wide open.

Inital ls of bamboo invoices directory.

Inital ls of bamboo invoices directory.

This is a pet peeve of mine so, I fixed it:
$ find . -type f -exec chmod 0644 \{} \;
$ find . -type d -exec chmod 0755 \{} \;

Then, I had decided that I needed to check for more cruft, before doing anything else. A quick find and I see .svn folders and .DS_Store files peppered everywhere. Again, I'm annoyed, but it's an easy fix:
$ find . -name ".DS_Store" -exec rm \{} \;
$ find . -name ".svn" -exec rm -r \{} \;

I was satisfied with the directory structure and moved on to the manual for installation. The manual was visually well put together and seemed to have easy-to-follow instructions. I modified the configuration files locally as explained and created the database on my webhost. Easy-peasy. The next step simply said "Upload your files – Not much to say here. Place the files on your webserver." So I did. I jumped into ncftp and did a quick put -R . and away I went. Ten minutes later it was still running. I remembered that the size of the zip file was only about 2MBs. I knew something was fishy. I jumped to another terminal and did a find . -type f | wc -l to see how many files we were dealing with here. The result: 531. I thought to myself, "wow, that's a lot of files for an invoicing system." So if your webhost supports extracting zip files on the server, I highly recommend you zip up your modified bambooinvoice folder and send it to your host as a single file.

The files were uploaded and I was eager to get to the easy part of the install. The manual recommended that I set the permissions on the invoices_temp, and img/logo folders to 0777 so that it can save invoices and a custom logo. No problem, cPanel makes that easy. The next step was to run the install script. I did that and it appeared to work. Hurray, it was installed.

I logged into the site and told Firefox to remember my password for me. I was very pleased with the layout and "prettiness" of the interface. I went into settings to modify all of my information. So far so good. When attempting to update my settings, I was given an error: "The Password field may only contain alpha-numeric characters, underscores, and dashes." Sure enough, during the install, the password I created had an exclamation point in it. That was easy to fix, and so I committed the changes. The install script and the settings area should follow the same rules for validation. I also noticed that Firefox kept pre-populating the first password field in the settings panel. This happened because the HTML form input had the same name as the login page. I turned it off and wasn't bothered again by it.

When testing out the invoice creation I noticed that my logo that I uploaded in the settings area wasn't there. I went back to settings and uploaded it again. The "Advanced Settings" section didn't give me any indication of whether the logo was set or not. I continued to try and create an invoice and still no custom logo and no error anywhere. I assumed I forgot to set the permissions correctly, so I double checked that. Still no logo. I then dug into the PHP code to see why it could be failing. It turns out that there is an inherent limit to the dimensions of a logo. A logo must be at most 900 pixels wide and 200 pixels tall. Mine was 600x228. Opened the GIMP and problem solved. The logo appeared. I also noticed that the existing invoices I created kept the original logo and weren't changed. I also tested and the existing invoices didn't change when modifying taxes either. Excellent. I don't want past invoices changed for those reasons.

Further down in the manual there were instructions on how to remove the /index.php/ from the URLs and make it easier to link directly and bookmark. The inclusion of a .htaccess file with the suggested rules was uploaded. That didn't seem to work. After searching, I found out I had to modify the config.php file and change the $config['index_page'] to '' from 'index.php'. This change then caused an infinite redirect loop when attempting to access the main page to login. This was fixed by changing the .htaccess to:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond $1 !^(index\.php|img|css|js|robots\.txt|favicon\.ico|update\.php|install\.php)
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>

I was then left to play around for quite a while with no more issues. The invoices were flowing and PDFs were generating all as expected. I was a bit disappointed by the fact that there is no apparent way to customize invoice layouts. But, for now, I can live with it.

I hope you don't take this post as negative toward BambooInvoice. It is still considered a "pre 1.0" product and thus isn't ready for bashing. I'm just pointing out what I did when installing the product and how that differed from what I expected. Hopefully by the time that 1.0 rolls around, most of these pesky things will disappear. The real testament for the product is the fact that I am, in fact, using BambooInvoice as my primary invoicing application.

I installed BambooInvoice 0.8.7 built on August 25, 2008 in a shared hosting environment.

One Response to “BambooInvoice Installed”

  1. [...] slightly embarrassed about my choice for invoicing mentioned in a previous post. I hastily went with the first one listed when I should have looked at the second page of the [...]

Trackback URI | Comments RSS

Post a Comment