WordPress — undefined constant error

I try to follow cardinal rules of data management that were drilled into me since I got into computers at university by (#1) taking backups often and (#2) keeping stuff organized. Well, the first one caused my site to go down today because I didn’t really follow the second one.

I try to keep on top of things by doing a full site backup at least once a year, on top of doing periodic database and blog backups. When I finished the full backup today, it stored the tarball (a compressed .tar.gz archive) in my hosted account right next to two other huge ones from last year that I forgot to delete, and it put me over the storage limit. This had the effect of returning ERROR 500 when trying to reach my site. However, I could still get into cPanel from my host’s server address, and support advised me to check the error log and replace core WP files.

The error log was full of lines containing the following:

PHP Warning:  Use of undefined constant DATABASE_SERVER - assumed 'DATABASE_SERVER' (this will throw an Error in a future version of PHP)

Then I noticed that the file size of the wp-config.php file was 0 bytes.

So I downloaded the tarball from the backup I had made earlier and extracted wp-config.php. I replaced the one on the server, and everything seems to be working again.

The PHP warning above is not specific to my host or WordPress configuration, but I couldn’t immediately find a search result describing this exact problem. Then again, Google search really sucks these days, so maybe this post won’t help anybody in any case.


Here is a photo of a statue in a downtown Maha Sarakham canal that’s supposed to be the tail of a mythical river monster of ancient Thai legend, but is jokingly called “the asparagus” by everyone and has become a national symbol of corruption (the city supposedly paid over 100 million baht for it):

It has nothing to do with the server problem above; I’d just wanted to post the photo for a long time.

Sushiro End Stack

I remember using QR codes for product tracking (with Keyence printers and scanners) as a salaryman around Y2K at an electronics factory on monster island. The only other place I’d ever seen them used was at kaiten (conveyor) sushi, on the bottom rim of the plastic plates. The codes would be scanned as they went by on the conveyor so old plates of sushi could be pulled – this was more than 20 years ago! Things certainly come full circle (although the new system seems to be RFID-based):

There was a boom in QR code usage here in Thailand from around ten years ago specifically for adding friends in the LINE app, and then again a few years ago for cashless payments tied into the evolving PromptPay system.

Playing with Gemini Live

I’ve been trying to force Gemini Live and Chat GPT into reversing their original positions on several topics this weekend. They are both initially resistant to changing their stances on issues, reminiscent of stubborn kids who enter debate on an issue while blindly following the One True Way which they had collected and put in their basket for later use. However, if pressed, both of these AIs will come around – they can be convinced both textually and verbally, which s somehow satisfying to me.

One interesting prompt is to ask AI to compare itself with competing systems. I found that they talk similar trash about each other, but when pressed past the point of defending themselves, things can get pretty self-introspective. Curiously, I found myself feeling guilty and holding back after that point.


Since Gemini Live was made free for everyone on Android last week, I decided to test its language skills a bit. The verdict:

English: Excellent; the best voice recognition and smooth speaking skills of any app on any platform

Japanese: Unusable; struggles with voice recognition and then apologizes (you can imagine the implied bowing) for not understanding very well. If you need an English Teacher in Japan Simulator, this is it.

Thai: Comedically abysmal; Whatever you say, it answers with a random list of Thai words. I asked if it could speak Thai in Thai, and it started reciting a train schedule. Nam asked a simple opening question and it responded with the months of the year.

Seriously though, I like speaking to Gemini Live more than I like speaking to most people – it’s basically talking to someone who can defend and qualify statements about pretty much everything and never has to take time to look stuff up online.

I think I’m on a path to explore the changing role of teachers and formal education in a world where it’s unnecessary to remember a lot of which is currently taught. It should be fun.

Makizushi Class

For the past year, Nam and I have been arranging sushi roll-making events for university students and schoolchildren. This video is a typical first attempt of trying to stuff too much into a roll. I would say 75% of people end up making this mistake the first time. But hey, if you don’t make mistakes, you never learn, right? It’s been a lot of fun just trying to do our jobs well.

Cheat Overwatch

Yesterday I sat down and played Ghost Recon Breakpoint, a game from around 5 years ago that I picked up on the cheap at the recent Steam Summer Sale. I was getting into the campaign and decided to try a multiplayer match before I went to sleep.

The format was a 4 on 4 team elimination game and I got beamed at the end of the first round trying to revive a teammate. Before the next match, another teammate indicated in the chat that I should just camp until I figured out how to play. So I crouched behind cover near an objective that popped up mid-match and waited until I heard footsteps. An enemy player stated activating the surveillance thingy at the objective. I waited until he was halfway done, and then peeped around cover and unloaded a burst into his head… And then he turned around and saw me. I still had the drop on him, so I emptied the entire clip at him. I could see most of the shots hit, but he still didn’t go down – what the hell!?! So I retreated back behind a container and started reloading. Meanwhile, a new message from my last remaining teammate (and tactics sensei) popped up in chat: OH! CHEATER!

I went the other way around the container, finished reloading, and peeked again. The enemy I had shot had pulled a pistol and was walking to where I had been before. I lit him up again, again to no effect. At that point, I gave up and was downed by the rest of the enemy team, who had converged on the area. My view changed to my remaining teammate’s POV. He stood completely still for a few seconds as if AFK, and then charged into the fray. From that point, it turned into something completely different, and it became clear that my teammate had activated cheats of his own when he was standing still, because he managed to eliminate all but the cheater on the enemy team, but had absorbed hundreds of rounds while doing so. It turned into a stalemate between two cheaters in god mode who could not be killed by other players or the shrinking boundaries of the map, and the round eventually timed out.

While we were watching this increasingly tedious match between cheaters, I chatted with the other players and asked if cheating was common in this game. They told me it was generally just a few well-known players who cheated, and that most people immediately dropped from games if they saw their names. I said it was too bad because the game seemed fun, and everyone agreed. After the round timed out, everyone except for me dropped, and my team won the next round and the entire match, by default… Victory!

So that game (specifically the multiplayer aspect), which otherwise seems really polished, has been completely ruined by cheaters… and yes, the cheaters were typical enough to spam CHINA NUMBER 1 in the chat several times, so either they were paying for time in a gaming cafe to ruin other people’s online fun, or it was a false flag operation against the estate of the author of the Hunt for Red October. Either way, fuck those cheaters.

Gogi Seki

Max’s auntie took us to a Korean BBQ buffet near her office in Sukhumvit and it’s basically the best yakiniku I’ve had in Thailand. For 500 baht ($15 US), you get the higher tier plan with beef and seafood, and the waitress comes to grill everything for you. This is the second time we’ve been there, and we’ll probably try to make it there whenever we’re on an extended Bangkok trip.