Dump A MySQL Database To YAML Using PHP

The Problem

I was recently working on a project that is built on WordPress / BuddyPress. I built up some content using the CMS features of WordPress in my development server and then I transfered the WordPress content to a beta server using the export/import functionality. That kind of stinks having to do that every time I want to push updates to my beta server. So I looked into using Doctrine to generate data fixtures which I could repeatedly run against the different database. Doctrine supports YAML files, which are extremely easy to edit by hand, so it seemed like a good idea.

So what’s the problem? Well, I didn’t currently have any of my data in YAML files. I didn’t want to had edit them or do some sort of copy and paste madness. So, I wrote a script in PHP to dump my data into a YAML file.

Read moreDump A MySQL Database To YAML Using PHP

Modify PHP CLI Include Path Dynamically

I was working with an application platform that I had just downloaded today. I just wanted to check it out and play with it a bit. In the application framework was an executable script that provided some command line utility. I fired up the script and received an error like “PHP Fatal error: require_once(): Failed opening required…”. Of course non of the files from the downloaded archived were in the include path for my system, but I didn’t want to just go adding it to my php.ini file just to play around with it short term. What to do.

Command Line Options

First I wanted to see if there was a command line option that I could pass to PHP to tell it what include_path to use for just this one execution. If you execute the following you’ll see the usage:
php --help
There is no include_path command line option, but there is the -d foo[=bar] option which allows us to modify any of the INI entries by key/value.

Read moreModify PHP CLI Include Path Dynamically

Building ChromiumOS (The Google OS)

I’ve been watching all of the hype about downloading and running the latest Google creation, ChromiumOS this week so yesterday I decided to take a stab at it myself. I did not however want to simply grab a VMWare image and run it. I’m a software engineer for Pete’s sake! I should build it myself. …

Read moreBuilding ChromiumOS (The Google OS)

Reason 4 + Virtual MIDI Driver + 64bit Vista

I’ve been a user of Propellerhead Reason in the past, but recently I wanted to dust off my chops and try to create some tunes again. My problem is that I don’t have a MIDI interface to attach my keyboard to this PC (yet). So I figured I’d install a software keyboard and hook it …

Read moreReason 4 + Virtual MIDI Driver + 64bit Vista

A WordPress Plugin – Hello XML-RPC World

In a previous post (How Can I Modify The WordPress XML-RPC System?) I outlined how one might create a plugin that adds functionality to the WordPress XML-RPC server. I’ve had some questions from some readers arise so I wanted to take the opportunity to provide a more concrete and usable example. WordPress Plugin First you …

Read moreA WordPress Plugin – Hello XML-RPC World

How To Manually Merge WordPress Tags

With the advent of “tags” in the WordPress blogging platform there have been several very good plugins introduced which can handle management of your tags. This includes merging tags. Why Would I Want To Merge Tags? One word… duplicates. In my case I created a tag for my Friday Song Of The Day posts. The …

Read moreHow To Manually Merge WordPress Tags