Magic in our back-yard

I am regularly reminded of the magic of living in the Pacific Northwest, and this past weekend was no exception. We have the luxury of living near a watershed (and major river) that facilitates a wild salmon return that is heavily regulated and maintained by the Washington Department of Fish and Wildlife.

When you sit and really think about how amazing salmon are not only from a sportsmen point of view, but their impact on culture, the food chain, and even politics it is really incredible to witness up close.

XML-RPC failure on PHP7.x

Recently I was told by the WordPress app that my site was in fact not a WordPress site, which I found a bit odd. Particularly because it certainly is! After sleuthing and debugging I discovered that while on PHP7 this is not an uncommon issue.

After some head scratching, I found that the XML-RPC “api” was failing for a couple reasons.

I received weird “parse error. not well formed” messages, with error code -32700.

If you’re seeing this, or having issues using the WordPress app (or any other API dependent service) with a wordpress site running on PHP7, chances are you’re in the same boat.

Finally, I identified that I simply needed to change my password to not contain non alpha-numeric characters. An odd bug I hope gets resolved soon as that’s a completely unnecessary security limitation!

Vagrant + Docker

Standardizing a development environment with Docker is challenging for a variety of reasons, the most common being that Docker simply is not the best of friends with Windows; particularly versions before Windows 10.

Regardless, when you’re running a modern development team with engineers and designers who have varying preferences of workstation, your environment needs to support them all.

In the past, we used Vagrant + Virtualbox + Ansible to build a virtual machine and we went from there. These days using Docker we can support an even deeper level of abstraction where you can run the environment natively, or in scenarios like Windows or on remote servers for demo purposes or what-not, we’ll run on a virtual machine or remote server.

All that to say we can now run docker+vagrant together to support this type of workflow. This way if you want to load up an environment on something where Docker isn’t supported well, you can run it through a virtual-machine with Vagrant, and otherwise just natively run docker-compose and be on your way.

First, our docker-compose:

Now, our Vagrantfile:

Third, we’ll want to abstract our configuration values to .env

Finally, application configuration

There will be things you’ll want to configure specific to your application and web-server to take this to the finish line, but if you’ve gotten this far, you know how to do the rest!