November 2011

Drush away unserialize() errors

When you work with the great folks I do every day it comes as little surprise that when the stuff hits the fan and some site is in need of help there will be a legion of folks who jump into round-the-clock action to get things in a better place. While this could be a whole blog post about that alone it's not about that. Rather it's about one of those nagging little problems we came across while working on a site this Thanksgiving "holiday".

The problem is one that many have seen at one point or another:

[26-Nov-2011 22:35:17] PHP Notice:  unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 200 of 1100 bytes in /var/www/mysite/includes/ on line 1104

In fact this problem pops up enough that it has its own page in the Drupal Handbook. The problem is pretty straightforward to understand. Some object was serialized for storage in the database and has become corrupted.

Quick address book tips

In the recent conversion to iCloud I ended up with a few hundred spare contacts on the trusty iPhone. Those who have tried the old fashion method of correcting this problem know how much fun it is to go into each of several contacts and delete them. WIth hundreds the fun grows into outright pain.

If you have an Exchange account setup on your phone that you're not using there is a quick fix. Go into Settings > Mail, Contacts and Calendar > and then to your exchange account. Set the Exchange account to sync contacts and you'll be prompted to delete local contacts. Once it does the work for you then turn contact sync back off and you're good to go.

What isn't clear is that this won't delete your contacts syncing with other accounts. It only deletes those contacts that are local to just your phone. This also only seems to work with Exchange accounts.

Another long time frustration with Mobile Me and now iCloud and address book sync has been what to do with those old addresses.

A day with iTunes Match

Overall iTunes Match has been worth it. There are some very interesting anomalies.

In some cases Match fails to match songs on an album for inexplicable reasons. Several albums of early 80's genres were matched for all but one song. Though the album had been ripped and encoded in a single shot something prevented these songs from being matched.

An even more interesting case is this album of Franz Danzi Concertos:
iTunes Match screenshot

Note that Match found 6 of the 7 tracks and uploaded just one. However this album is not available in the US iTunes Music Store (not sure if it's available elsewhere). The third track is available as a part of another collection but the other tracks are not available. Yet with Match I can (and have on another computer) update these tracks to a better encoded version of the tracks.