All posts by MXWest

Macbook OSX 2012-12-17 Update Breaks VirtualBox 4.2.4 Ubuntu 12.04 VM

As soon as I updated my MacBook Pro Retina 15″ to the 2012 December 17 update http://www.macworld.com/article/2020833/apple-releases-wi-fi-efi-updates-for-2012-macs.html, my Ubuntu 12.04 VM running on VirtualBox 4.2.4 croaked.

Workaround was simple, just disable 3D acceleration on the Display Settings tab.

Figured someone else might hit the same snag!

North Wildwood Panorama using Photonic WordPress Plugin

These pictures have appeared before (in my Google+ actually), but I found this very nice plugin that actually displays them quite nicely and figured I’d share again!

  • front_garden.jpg
  • light_house_rear.jpg
  • navy_331.jpg
  • mash.jpg
  • country-store.jpg

North Wildwood vacation, panoramas created with Hugin. The Plugin used to display these photo is call “Photonic Gallery.” It works with Picasa, Flickr, SmugMug and 500px.

php and MongoDB: A ‘find $exists’ Mess of My Own

File this one under “Easy to Overlook … Duh”

Using php with MongoDB to process CSV files, and I want to find all the documents that do not have a particular field. (Inbound, I’m naming the fields a particular way. I’m also using ruby inbound, don’t ask, at least not yet…).

So, I want all documents where a field called UKNOWN_0064 does not exist. So I write:

$m = new Mongo();
$orders_in = $m->$mongo_db->$mongo_coll->find(array("UKNOWN_0064"=>array('$exists'=>'false')));

But I get everything that does have UKNOWN_0064 and none that don’t!

Anyway, you guessed it … the problem is

'$exists'=>'false'

Really needs to be

'$exists'=>false

And so the correct code is:

$m = new Mongo();
$orders_in = $m->$mongo_db->$mongo_coll->find(array("UKNOWN_0064"=>array('$exists'=>false)));

And here I had been feeling so smart to remember to use single tic to pass $exists - and yet blinded by my own ego to miss not enclosing the boolean false.

On a side note, if anyone knows a nicer way to play with MongoDB than all this array business, let me know. It’s clunky to me.

Magento Shipping: USPS “API Authorization failure. RateV4 is not a valid API name for this protocol.”

The Problem

This was a doozy today. I signed up for USPS Web Tools, plugged my User ID and test server details into my Magento Development site, and was rudely greeted with the error:

API Authorization failure. RateV4 is not a valid API name for this protocol

My initial symptom: I didn’t see any USPS rates in my front end. Enabling debugging allowed my to see the error in /var/log/shipping_usps.log.

The Fix

The problem is that the USPS test servers didn’t support RateV4. So, you email USPS support to enable production server access for your USPS User ID. And we’re all set!