In php, empty arrays are falsey, not truthy

This entry is part 4 of 5 in the series php features

Maybe I should have known this. But I didn’t, to my detriment. Empty arrays are falsey. Like so. The rule that an empty array is falsey bit me when doing this sort of thing. Many SQL queries can return an empty result set, that is, a result set with zero rows in it. That’s a … Read more

APCu in php — some notes

This entry is part 2 of 5 in the series php features

I’ve been working on the SQLIite Object Cache plugin for WordPress. I’m using the APCu User Cache, php’s RAM cache subsystem, to accelerate cache lookups — specifically to support wp_cache_get() and wp_cache_get_multiple() operations. I’ve had to figure out a few things about this php feature. Here are some notes. Its documentation is not as comprehensive … Read more

Setting up a WooCommerce shop

Somebody asked how to set up a WordPress / WooCommerce shop with the Flatsome theme. Understand that this is a web site operations project, not a development project, at least until you get it basically working. For now, ignore any advice to use Bricks, Elementor, Divi or some other site builder. You’ve chosen Flatsome. Get … Read more

ffmpeg Metadata Processing notes

I find myself needing to hack ffmpeg metadata in order to post Gordon Bok’s collection of Kalmyk music. The files ripped by ITunes contain all sorts of metadata. It can be extracted by a command like this and the output looks like this, including a bunch of ITunes-specific metadata items, as well as identifying metadata. … Read more

SQLite3 in php — some notes

This entry is part 1 of 5 in the series php features

I’ve been working on the SQLIite Object Cache plugin for WordPress, so I’ve had to figure out a few things about using SQLite itself and php’s SQLite3 extension. Here are some notes. There are various versions of the SQLite software around. If you will run your code on multiple different hosting providers and server configurations, … Read more

php, Ubuntu, fpm, xdebug, PhpStorm

Here’s an oddity which baffled me and kept me from being able to use xdebug with PhpStorm for a while. I installed a bunch of different versions of php on my Ubuntu VM. I used Ondřej Surý’s repository, rigging my vm to install them like this. To get php5.5, use these commands: Then, I followed … Read more

Setup Problem at Google Workspace for Nonprofits

Recently I worked to help a local nonprofit org sign up and start using Google Workspace for Nonprofits. It’s basically private-labeled gmail and Google Drive. An org can use their own domain to get email. For example, if you use Google Workspace you can get your email at programs@example.org address instead of programs.example.org@gmail.com, or whatever. … Read more