Broken WordPress

Techies live by two very wise philosophies:

  1. If it’s working, leave it alone
  2. If there’s a security update, install it

You might notice a paradox here.  And therein lies the source of endless frustration.  Plainly stated, you can’t install a security update unless you mess with a working system.  So what to do?

Well, my personal plan of attack has been to check the patch notes before installing anything, and judge its relevance to my given application.  For example, I put off updating my VPN software because the patched vulnerability was an old version of L2TP/IPsec–something I don’t use.

But the growing list of CVEs on my WordPress install started to concern me, some of which were alarming, like broken access restrictions with URL injection.  Yikes.  Still, I waited, because I really didn’t want to mess with it.

Then my server automatically updated its PHP packages (I thought I had disabled automatic updates), which brought my blog down.  So begrudgingly, I used it as an excuse to finally update.  I began the install process.

As it turns out, WordPress runs on PHP 5.6 (the scripting language which loads data from the SQL backend)–at least the package I have installed anyway.  Other programs I run require PHP 7, so I have both installed.  But the automatic PHP upgrade deactivated 5.6 in favor of 7, which not only broke the site, but prevented the install.  I manually reactivated 5.6, which then triggered its own update, requiring me to patiently wait another hour while it completed.

PHP updated, I tried to load the installer again, but found out that the MariaDB (the open-source fork of SQL) version, version 5, had been stopped in favor of version 10–very similar to the PHP problem.  So I reactivated version 5 and waited patiently while it updated.

These updates collectively maxed the server’s processing power, which then brought down the entire machine.  Nothing’s more nerve-wracking than watching an eternally-spinning icon, devoid of any meaningful information like a status bar.  But, patience and a lot of burning stomach acid later, the installs completed and the server came back online.

I started the WordPress install, and was prompted for MariaDB 5’s root password.  I looked up my complex and randomly-generated password, pasted it in, and continued.  Then I was prompted for MariaDB 10’s root password.  Curious, why would it need both?  Unfortunately, I have yet to find a solid answer, as the WordPress package installations and their associated communities vary widely across the web.

It’s friendly logo hides its true nature

Then I was prompted for my database user account, which I input as well.  The installation clocked for several minutes, then advised that I did not have access to the databases.  Curious.  I knew with certainty what my user password was.  I considered that maybe the root password was different.  To find out, I installed a database management interface and attempted to log into both databases as root.  All attempts failed.  So apparently I didn’t know the root’s password.

A brief web search revealed the default password to be blank, which bothered me immensely.  Granted, it probably wasn’t as big a problem as I was thinking, since presumably only the localhost would have access to the database, but that still seems like a bit of a security hole, like say if malware made its way into the machine.  Also, the management interface I had installed was Internet-facing, which meant that the moment I installed it, my databases were publicly accessible.  Nothing private is in there, but still.  Ah well, I used the interface to change the root passwords for both databases and reattempted the update with the correct credentials.

The install crashed and the logs said the update failed.  I checked the install package, and its version matched the newest.  Confused, I consulted the logs again, but this time it said that the install was successful.  Finally some good news.  I opened up the site.

The site loaded its front page, but without images.  I refreshed the page, only to then find that the only data loading was in the browser’s cache.  The page wasn’t there anymore.  So I checked the web directory’s contents and was dismayed to see that the entire WordPress folder had been purged of data.  The update had reinstalled anew, rather than updating.

I had taken the precautions of backing everything up, so I wasn’t completely distraught, but I began to fear that the WordPress package itself was beyond repair.  I had previously considered 3rd party hosting solutions, and figured that this would be my final salvation.  But first–I would use my automatic backup service to retrieve the last version from my Amazon Drive account, which was timestamped as that morning around 5AM.

The restore took about a half hour.  I reloaded my site, and it worked!  I admit I was surprised.  I had surmised that the site solely operates through a conglomeration of PHP scripts which access the database, but if that were  the case, then the file restore would have wiped out the upgrade–which after checking again, it hadn’t.  So it was the package itself that got updated, not necessarily the script files.

I admit, I still have a long way to go to understanding this technology, but that was the original point of starting this blog.  For now, I’ll remain content that my site is functioning at all.


Game Relationships

There’s a human cost, in NPCs, when trying to simulate groups of interacting individuals.  Too often are AIs reduced to two interactions: be hostile or don’t be hostile.  Yes, that’s a ubiquitous human paradigm, but there’s one that’s even more common–humans forming relationships–which is rarely explored to any convincing degree.  And so, the NPCs with which we share our virtual worlds never deviate from their proscribed emotional state…unless we need to kill them.

But all that’s beginning to change, and looking back on earlier games, I find my in-game actions to differ drastically based on the lack of meaningful NPC relationships.  Is that an over-analysis of a recreational pastime?  Yes, yes it is.  But here we go.

Of the Bethesda games I’ve played, Skyrim was the first to introduce marriage, which then carried over (sort of) into Fallout 4.  In the latter, you can technically form romantic relationships with a variety of characters, who will then dutifully follow you everywhere.  While doing so, they’ll kill enemies, make snarky comments, judge you on morally ambiguous decisions, and…have sex with you every time you take a nap.  This includes improvised bedrolls found in dingy subway maintenance rooms–wedged between the shelves of industrial solvent and derelict generators.  There isn’t even an option to say no–it just happens automatically every time.

Skyrim was a little different, limiting sex to your home and rented hotel rooms.  It also limited these entanglements to a single person–who must be your spouse.  And no, you can only have one spouse at a time (in fact, I’m not even certain if there’s a divorce option).  I guess these were more civilized times.  And once married, a spouse will faithfully fight alongside the player character, giving greater meaning to in-game marriage beyond someone who simply shares your house.

Apparently Frank Frazetta designed her armor

Prior to Skyrim, Fallout 3 limited romance to a prostitute and some teenager who kind of had a thing for all the boys in town (your character included, upon visiting).  Then again, Fallout 3 was about the bleakest game I’ve every played, and even when stumbling across remnants of what might have been a happy relationship between two NPCs, it generally only served as a plot device, as the outcome was always bad, to introduce more despair (e.g. the embracing skeletal remains of a couple on the couch–incinerated where they sat).

Fallout 4 introduced the ability to pick out a spouse’s outfit–in this case, a kevlar-underweave summer dress–nothing but the best for my postapocalyptic wife

Of course, “sex” in these games is limited to triggering a sleep cycle, having the screen fade to black, then waking up with a temporary experience buff and an on-screen vague inference to having slept in proximity to your lover.

But before this, Oblivion hardly touched on the concept of romance at all.  Some NPCs had spouses, but except for two instances I can think of offhand, the married characters only complained about said spouses.  And you as the main character cannot find a girlfriend/spouse.  Maybe Bethesda didn’t feel that would fit well into the game, and I know they were really trying to keep a teen rating on the game (ultimately unsuccessfully), so perhaps it was best to exclude sex and all innuendos completely.

The result is that I always feel like a bit of a Clint Eastwood character in Oblivion.  I show up, do some generally good deeds–some questionable–then I ride out of a town to unknown parts.  And for the most part, I’m always alone.  There are some characters that will follow you, but there’s no personal connection to them, and I tend to just enjoy watching them take beatings again and again at the hands of wolves and bandits.

Such is the fate of heroes–after crises, they cease to serve a purpose.  Fallout 3 recognized this by killing the main character.  Skyrim and Fallout 4 gave meaning to the post-crisis character by giving them a family.  But Oblivion offered no such purpose.

So my Oblivion character wanders eternally.

Were I to have no wife, would I wander eternally in search of purpose like my Oblivion character?  In games with no endgame, the fate of heroes might uncannily parallel the player’s deeper sense of purpose.  I even built a retirement home on the beach in Fallout 4, after completing the main campaign.

An identity crisis from video games.  Who would have thought?


Nukaworld (Part 2)

Okay so I lied.  You didn’t really expect me to never play this DLC through, right?  I mean, things needed killing, and they weren’t going to kill themselves, despite me saying, and wishing, that they would.

In summary, the plot involves traveling to a large raider camp inside a derelict theme park, becoming one of them, re-taking the other areas of the park that had since gotten overrun with various threats, distributing the spoils, and solving the raider factions’ political problems.

Yeah, that sounds miserable, or

You can travel to the raider camp, become one of them, re-take the other areas of the park that had since gotten overrun with various threats, then go on a bloody rampage and murder every raider.  As I usually default to the harbinger of justice, I chose the latter option which, after the painful trudge of retaking the parks and listening to this large group of psychopaths complain about their problems, was way more fun.  Besides which, it seems a little unsporting to team up with the psychopaths and go kill regular people just going about their business.  Violence needs a proper motive, and if my predilection to save innocents wasn’t sufficient, the desire to silence all the whining certainly was.

There’s my very brief synopsis, now funny photos:

Yeah, whoever did this just needs to die for obvious reasons
A nice little homage to Psycho here
If this is a reference to something I sure don’t know what it is–death by flamingos?  Is this a Hitchcock nod?
After killing the raiders, the merchants are freed. I think the game was scripted to remove their slave collars, but it looks like it glitched and removed all of their clothing as well. Now there’s a market filled with people in skivies.


Lazy Eye

I have 3 monitors up currently, running at maximum resolution and with the sizing adjusted to cram as much information as possible onto these screens without feeling eye strain.  I casually peruse the internet.  Every tech site I visit has followed a similar theme–they’ve used the entire monitor’s real estate for its intended purpose and filled it with information.

Then I visit a blog and there’s large segments of white space and the articles are crammed into tiny columns with large verticality.  Now, I do know why, as I’m in the industry and have had experience with web design (I’ve even attended a seminar that touched on this): the human eye is lazy and wants to float through text as comfortably as possible, and varying studies have revealed anywhere from 45-70 characters per line to be the most comfortable.  And to this I say quite frankly: bollocks.

I can’t remember the last book I read, aside from a children’s story, which adhered to this philosophy.  Oh I know the argument has been that paper reads differently from digital, which has also been the primary argument in the running debate regarding deprecating serif fonts; but how lazy are we really when we want to read something of interest?  Personally, I don’t find it all that difficult to adjust to varying font sizes and widths, and my eyes are far from 20/20.  I do find it irritating, however, to have to continually scroll down a page as I read.

It was a lingering gripe I had with this default WordPress theme, that it was capping content width at around this 75-character mark, and no obvious means existed by which to adjust it.  The whole point of using an authoring program like WordPress was to not have to dig into code to add content and make changes.  Adding to that, it’s much more difficult to dig into code that someone else made than it is to modify my own, so this issue is doubly aggravating.  Further still, each version of WordPress and each separate theme has different settings, so consulting the usual Internet discussion was fruitless.

No matter, it’s all CSS after all.  How hard could it be?

As it turns out, it’s relatively easy to make the change.  The difficult part was finding the styling info I needed.  But thankfully, WordPress not only has an engine for modifying the stylesheet within WordPress itself, they were kind enough to also have left a comment trail throughout.  I found what I was after in a little section called Layout.

Post-modification, additional comments are mine to remember default values

“.wrap” encompasses anything under that umbrella, and after experimentation I found that 1200px made much better use of a full desktop monitor without overloading visual elements.  Then I adjusted the percentile ratios of “#primary”, the main content column which contains posts, and “#secondary”, all that sidebar stuff to the right.  Above are my changes.

Like all web design, visual layouts are trial and error, and I may tweak things more in the future.  But for now, I find the posts’ width to be much more practical.  And now my embedded images appear bigger as well.

I’m sure much of this is personal preference, but I really hated wasting all that space.  Whether or not anyone else might agree with my assessment, at least this post shows the means by which it can be changed to suit other’s needs.


I Speak for the Trees

The Christmas tree is up.

That statement carries heavy implications, to which family men everywhere shudder from mild PTSD.

Seriously, it’s a lot of effort for such a bizarre holiday decoration.  In years past we had opted for an artificial tree, mostly because we lived in rented property, but also because I didn’t want to deal with the mess.  That’s when we acquired would would be known thereafter as “The Martha Stewart Tree”, because we bought it at K-Mart (of all places that’s where Martha Stewart had her brand sold at the time), and it looked better than any artificial Christmas tree we had seen elsewhere.

But the tree came with very questionable pre-wiring (which I later removed), and the clipped wires of the tree’s frame were lethally sharp.  And the damn thing dropped fake needles everywhere which the vacuum refused to pick up.  Fuck that tree.

So we’ve since made the switch to real trees.

Of course, real trees have their own set of problems, but whatever kind we got this year has been especially awful.  This one doesn’t have any real branches, just a bunch of fluff that can’t support any weight, so I only have half the lights on it that I would normally.  And the sap gave me an allergic reaction.

Plus, the ornaments keep falling off.  Look at the kid’s consternation as she debates their placement:

This was a terrible species for a Christmas tree.  I sure hope Liz remembers what it was so we don’t get that kind again.  I’m about to go Griswold on the neighbor’s spruce.