Drupal Gallery Application

| No Comments | No TrackBacks
Some exciting news from the Drupal development-ness here at h2j9k.org!

I have succesfully reverse engineered the cryptic instructions of Jeff Eaton from this blip video for creating a drupal gallery using only the GUI interface on a fresh drupal install! (assuming you are familliar with vanilla drupal install and module installation).

I will be posting more detailed instructions (and hopefully a video on blip) explaining the missing links, along with a post on here and some entries in the h2j9k knowledge base.

That's it for now, more when I have time on Sunday Morning!
The Royal Mail unions are on strike. Again.

Now I am a Social Liberal. I know that equality can be used to increase the freedom of those that Market economics leaves behind. I also assert that having proper employment law and a minimum wage can vastly improve the quality of life of those at the bottom of the payscale, without particularly impacting non-exploitative businesses.

But striking over job losses which are occurring because of the poor performance of your company really is against all those principals. It will negatively impact the business you are working for (Royal Mail is taking a pretty good beating now that people have stopped writing to each other...), and thus cause even more job losses further down the line.

All you are doing is giving me the incentive to use the more expensive courier services on offer at Amazon instead of the free royal mail option, because they are more reliable. The loss of internet order deliveries (as the cheap option on many websites) would really be the last straw for Royal Mail at this stage. Part privatisation may not be necessary, but innovation and moving with the times certainly are; and that means providing a cheaper slower, but critically reliable service.

Parallels should be drawn with the 1680 French ban on looms - I am serious - the guilds persuading the powers that be to ban looms for anything other than silk so that people who hand knitted woollen things wouldn't be out competed - "French jobs for French workers". The Postal Unions aren't asking to ban email, but they are still striking because of the decline of an industry that has been out competed for personal correspondence by the advance of technology; this is the real problem that their company (publicly owned or not) is experiencing and they should be helping to innovate rather than dragging it into even more of a mess.

All I had ordered was a couple of new waterproof USB sticks to store encrypted data on (the old ones are starting to fall apart and I don't want to lose the data - nor copy it onto a magnetic drive of any kind). I have been waiting well over the "5 business days" that the order was supposed to arrive after, because of multiple waves of postal strikes.

So in short, if people who strike far too often for bad reasons have caused me to lose the database passwords for my server's application users then I will be VERY cross indeed and will endeavour to never use Royal Mail's services again in protest.

I love MAMP

| No Comments | No TrackBacks
I have found the answer to my drupal theme development / virtualbox / triple boot macbook problems. it is called MAMP and it lives here.

You copy it to your applications folder, you run it, and you get a window indicating the on/offness of your new shiny apache and mysql servers.

Administering the database required me to think briefly (while I negotiated the GUI provided on the default web page - I wasn't going to add no /Applciations/MAMP/bin to my $path, no surree...) but I was soon up and running with my very own drupal install inside OS X with no fuss and no fiddles or hacks. Woo!

Now admittedly in about 3 days I am going to receive the super shiny snow leopard install disk, and I will have to spend a day and a half reinstalling all my extraneous crap (including this) but the built in SQL dump (on the phpMyAdmin pages) seems to allow me to back up - resinstall - restore just like I would if moving servers.

Again, I say, woo!

I have no actual news

| No Comments | No TrackBacks
regarding any projects, I am afraid.

One piece of "news" though is that Virtual Box appears to suck. I have been running it for a while now on my MacbookPro and it keeps crashing the VMs. While I'm working on things. (entirely nay cool when one is taking baby drupal-theme steps in ubuntu with quanta actually up and running for once).

Thus soon there will appear an article about how to get a MBP triple booting OSX Snow Leopard (tomorrow, baby, yea...), Windows 7 (not RC, full version baby yea...) and [insert linux distro that I will eventually get working here] (totally free and been out for ages yea....)

OK, apologising for how american that last sentence sounded. It's colour wasn't very humourous, init. There, that's better.

To make up for this post's lack of actual content, I provide a link to a comic that just made me laugh (the random buttons on webcomics are DANGEROUS).

I especially enjoyed the last comment on the last pannel; "even chicks are subject to entropy, man."

Until later, good sirs (and good...entropy chicks?)

My my isn't making a drupal theme hard...

| No Comments | No TrackBacks
I thought I had read a lovely little internet article explaining how to (in 10 minutes) make a drupal theme out of an html document with a css file. When I came to actually try it however...

As such I am embarking on a project which should allow me to make drupal themes very quickly, by taking one of the system themes and subtheming it mercilessly. This should allow me to use all the existing nifty javascript and stuff that determines which menu items should be opened and what the breadcrumb trail should be, while hacking the CSS and layout to make my site look less "default drupal".

I will tag all the posts drupalthemedev so that you can all watch as I go over the next few days/weeks. (hopefully days rather than weeks...)

More to be said when I actually have some time to work on it (hopefully by this evening).

and we are go for launch

| No Comments | No TrackBacks
OK, we now have an empty site up at www.h2j9k.org!

Drupal is nice and makes life easy, as long as you don't mind using the default themes. I will be sorting this out in due course (I have several sites to build, and so am set to become something of a drupal theme expert and will have more to choose from :) ) but until then my radical political persuasion will be blazed across the site for all to gawp at. ("vivo communismo et le liberta..." - not actually a communist, but you'll hear more about that no doubt)

Remaining task here is to get blog.h2j9k.org to auto redirect to /tech/ so that you can all see it when you go there (instead of seeing the welcome to centos page..... nice....)

And equally soon we shall be getting some links and bits up on the www-root so that there is something to see, before I start building the knowledge base of code things.

Apologies for the boring vanilla nature of the post, but frequency is the key to blogging, as we all know.
I have just spent many hours of my life installing php, perl modules, image processing libraries and all sorts of nonsense onto my shiny new VM somewhere out there (in Maidenhead I think...)

...and the result of this is? Well, I have a working install of Bugzilla and Moveable Type of course!

This is a bit of a sysadmin / linux post, so any developers who are bored by such niceties had better look away now.

Soon to be expanded into an article in the wiki (which doesn't exist yet), I present the h2j9k.org guide to installing Bugzilla on a vanilla linux server install (this method has worked on CentOS, openSUSE and Debian) using only SSH and the power of the terminal...

I open with a well quoted sentence of extreme relevance:

PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil, perpetrated by skilled but perverted professionals. -- Jon Ribbens Amen.

Before I started this charade, the only time I had installed Bugzilla was for testing on my development machine. Now when you build a dev machine, you install basically everything in all of the development packages you can find in zypper/apt/yum, don't you? (well, I do). And after you have done this, following simple instructions like

perl ./install-modules.pl --all

Seems sensible. It makes you put Bugzilla in the mental category called "oh just unzip the tarball and point a browser at it to get it working" web applications. You trust in the open source goodness of the creators of wonderfully easy to use applications that you can obtain use and customise for free. Sunshine appears from under your keyboard, and suddenly you are transported to a bustling central London park, with free wifi access, ice cream, and an iPhone 3GS.

So, when building a minimalist command line only Debian server, you think "it'll be fine". You make a cup of tea and sit down to install Bugzilla in half an hour or so. But you have forgotten one thing. Bugzilla is not written in PHP. It is written in Perl.

And Perl doesn't let you get away with things that easily. Not only must you install the interpreter for this unparsable excuse for a scripting language, you must also install a million and five crazy modules which, if your .deb or .rpm based distribution doesn't provide in convenient binary form, you must install from source.

Now I have nothing against building software form source. I would run Gentoo on my new laptop just like I did on my old one if it weren't a Mac, and OS X didn't let you build open source stuff using an awesome package manager already, and work quicker. The problem with building Perl modules from source is that you must use Perl to do it. And Perl is the most hacky, bodged and broken way of building things from source, with the lowest level error reporting you have ever seen, so much so that all errors are completely impenetrable to mere mortals like myself. The only way to do it is to change into some old clothes you don't mind getting filthy in, and put of the following protective safety equipment:

Install gcc, g++, make, automake, autoconf, and every other low level linux dev package you can find. Even gfortran is advisable. If you are on a graphical system, just catch all by installing kdevelop or anjuta, as appropriate to your desktop environment.

If you are going to install something called, say, GD or Image::Magick, run a search in your native package manager and install everything by that name and with that name followed by -lib or -devel or -perl.

Remember the following command as the saviour of some Perl woes, and the generator of others:

~$ perl -MCPAN -e shell

This command takes you to a perl shell which should let you install and debug modules one at a time. You will initially need to configure the CPAN shell - let it do it automatically (you can break things by choosing the wrong options and then it will fail to build anything).

Installing one at a time is infinitely preferable to bulk installs (until you have most stuff working already perhaps) as the relevant error output isn't 500,000 terminal lines upwards from the exit point.

Install a module using:

cpan0> install Their::Hacky::Module::Name

And hit enter to accept the default when it prompts you about dependancy installation (why the people at CPAN thought that prompting for dependency install was a good idea I will never fathom).

Repeat and rinse for 30 minutes or until golden brown (i.e. you have installed all the dependencies of your Perl app). If you run into build errors it may be that the module is simply broken (and as long as it's only optional i strongly advise you to just skip it) or it will be that you don't have a compiler or linker or maker or somesuch.

If you are using this to install bugzilla, you should exit the CPAN shell using 

each time you successfully install something, and rerun ./checksetup.pl and see what remains to install. leave the DB settings as broken until you have installed all the modules.

Now, if you are using mysql, you are about to discover even more fun. The installer script will try and use the ALTER and INDEX SQL commands, which means that the nice MySQL docs example for a creating a limited user will break. Replace it with the following when creating and assigning privileges to the user:

CREATE USER 'monty_bugs'@'localhost' IDENTIFIED BY 'obscure_password';
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX ON bugs_database.* TO 'monty_bugs'@'localhost';

Further narrowing down the usefulness of the information, on CentOS (and I Imagine redhat) you are stuck with the DBD::Mysql module from an rpm (it is a dependancy of the mysql-server package for some reason) which is too old for the latest stable release of Bugzilla (installed is v3, min required is v4). You need to manually download version 4 as appropriate for your distro from somewhere like this (make sure you get the right architecture - you are being yum at this point) and install using rpm --install --force /path/to/rpm.rpm

OK, soon this overly opinionated rant will be converted into a passive tense tree of info regarding particular distributions and setups on a MoinMoin wiki (as soon as I have time to get that working) but for now here is the somewhat uncensored version.

Happy Saturday all. (oh by the way, the Movable Type install was a breeze (even though it is also mostly Perl), Bugzilla devs take note.)

I just finished installing Movable Type 4!

| 1 Comment
Welcome to my new blog powered by Movable Type. This is the first post on my blog and was created for me automatically when I finished the installation process. But that is ok, because I will soon be creating posts of my own!