Ubuntu 12.04 (Precise Pangolin) and PHP 5.4 (again)

My previous post, Ubuntu 12.04 (Precise Pangolin) and PHP 5.4, has been extremely popular but I left some work for the user to figure out.

In a nutshell, here is how you install PHP 5.4 in Ubuntu 12.04 (Precise Pangolin).

1. Install the signing key for the PPA (which also adds the sources to apt):

add-apt-repository ppa:ondrej/php5

If the above command is not available, install it using:

apt-get install python-software-properties

2. Now update the package database and then upgrade the system. As part of upgrading, PHP 5.4 will be installed automatically:

apt-get update
apt-get upgrade
apt-get dist-upgrade

Now, you should have PHP 5.4 installed:

# php -v
PHP 5.4.3-4~precise+1 (cli) (built: May 17 2012 13:00:25)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

As an aside, at the time of my previous post, PHP Memcache packages were not available from the PPA but that has since been rectified.

Joseph Mallozzi :: Remembering Joel Goldsmith

Over in his blog, Joe Mallozzi wrote a fitting remembrance to Joel Goldsmith:

Finally, we come to Joel’s last piece for the Stargate franchise, that beautiful closing theme to the SGU finale, Gauntlet.  …  When we received the director’s cut, the sequence had included a gorgeous piece that I felt was nothing short of perfect.  I loved Joel’s work, knew what he was capable of but, I have to admit, I doubted even he could trump the music that accompanied the director’s cut.  But Joel wanted to try.  He did.  And succeeded.  If that original piece was nothing shot of perfect, then the closing piece Joel came up with was beyond perfection.

As a huge Stargate fan – (can you believe it’s three series, 17 seasons, 354 episodes) – it’s fair to say that Joel also provided the soundtrack to quite a chunk of my life! Here’s that closing sequence of the final episode of Stargate Universe (and the franchise) Joe was referencing (which was perfectly paired with the opening sequence of the first episode of Universe):

Ubuntu 12.04 (Precise Pangolin) and PHP 5.4

UPDATED in Ubuntu 12.04 (Precise Pangolin) and PHP 5.4 (again) (May 22nd 2012).

I was looking forward to trying out some of the new features in PHP 5.4 when I upgraded to Ubuntu 12.04 this morning. Unfortunately, Ubuntu decided to stick with 5.3 for this release.

There is upgrade path available though via a PPA (Personal Package Archive) from Ondřej Surý at https://launchpad.net/~ondrej/+archive/php5.

I’ve just installed it and it’s working fine with Apache:

$ php -v
PHP 5.4.0-3~precise+4 (cli) (built: Mar 27 2012 08:50:50)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

 

Engineers Ireland – IPv6 Presentation

This evening I will be presenting the following to Engineers Ireland on behalf of INEX.

 

Essential Windows Software for a Fresh Install

I get landed with new computers from time to time for colleagues, friends and family to install / set-up. Here is my list of essential Windows software for these.

The first thing I do is a fresh install of Windows to remove the crazy and ridiculous amount of bloatware that comes pre-installed and makes the system as slow as a wet week. Then after re-installing Windows and the necessary hardware drivers (Windows Update will get most of these automatically), I then:

New Replication Features in MySQL 5.6

I’ve just been reading an article on replication in MySQL 5.6 and there are quite a few new cool features that will vastly improve replication environments with MySQL. Some of these include:

  • Optimised row based replication (documentation here) – replication used to mean execute the exact same queries on the slave server(s) as the master. This, as you can imagine, was incredibly inefficient. With row based replication, the resultant changed row of an INSERT, UPDATE or DELETE operation was replicated saving significant resources on slave servers. This was a big win. It now looks like it’s been further optimised in that only the changed elements (and a primary key) need to be replicated.
  • Introduction of Global Transaction Identifiers (GTIDs) allowing the source and sequence of a replication statement to be globally unique within a replication cluster. This with some cool new utilities (mysqlfailover and mysqlrpladmin) create a lot of native options for failover for maintenance or failure (see more about GTIDs and the utilities).
  • Time delayed replication allowing a slave to purposefully remain behind the master for any given delay. This may be a life saver for that table you accidently dropped!

There’s a lot more too and you can read about it all here.

ViMbAdmin 2.1 Released – POP3/IMAP Access Restrictions

We’ve just pushed a new release of ViMbAdmin – version 2.1. The main highlights are:

  • it’s now possible to restrict access to a mailbox via either IMAP, POP3 or both. See this page on the wiki for more information.
  • it’s our first release requiring a database migration. But it’s really really easy – see this page for those instructions.

As always, a live demo is available at: http://www.opensolutions.ie/vimbadmin/.

“Learnings from open-sourcing Bootstrap”

Mark Otto, the man behind Twitter’s Bootstrap posted a good article summarising his experience on the open source process.

His own tl;dr version is:

Open-source is awesome, sometimes work is hard, be excellent to each other, do what you love, fuck yeah.

Looking at New Features in PHP 5.4

PHP 5.4 was released at the start of March and heralds a key new feature which I have long bemoaned the lack of: traits.

Traits (see PHP’s documentation and Wikipedia’s description) allow programmers to define a set of functions which can be shared among different classes in ways that normal inheritance cannot do.

A Trait is intended to reduce some limitations of single inheritance by enabling a developer to reuse sets of methods freely in several independent classes living in different class hierarchies.

I’ve banged my head against the desk a number of times trying to work around the lack of traits in PHP and I hope PHP 5.4 makes its way into mainstream Linux distributions a lot quicker that 5.3 did.

There are also a number of other interesting features which look really cool:

  • Simpler array dereferencing: $secondElement = getArray()[1];
  • A shortened array syntax: $a = [ "foo" => "bar", "bar" => "foo" ];
  • A built in web server (for development) which could be really interesting – see here.

 

TallyStick, ViMbAdmin and a CSS/JS Minify Tool

It’s been a busy few weeks:

  • We launched TallyStick – a time tracking and billing tool – two weeks ago and have pushed some bug fixes and updates. So far so good!
  • IXP Manager, an open source web application to assist in the management of Internet Exchange Points (IXPs) that we built over at INEX, got a complete UI refresh thanks to Twitter’s Bootstrap;
  • Similarly, our open source email domain / mailbox / alias management tool called ViMbAdmin got a major version bump, lots of new features and a UI refresh also;
  • We also just open sourced (BSD) our (admittedly small) Minify tool which makes minifying, bundling and versioning the manner JS and CSS files that make up websites these days a breeze. Check it out on GitHub: https://github.com/opensolutions/Minify.