Posts by: TheCra1gster

FFS MySQL

FFS MySQL

I recently lost 2 hours of my life trying to change a MySQL root password. F.F.S !! If you search the interwebs, you’ll find the pundits recommending something like the following:

For some reason, the mysqld_safe script wouldn’t run in the background even though the ampersand was definitely present. Control never returned to the foreground and I then tried connecting to the MySQL server in another shell and perform the password reset yet it didn’t work – the result being that the password was reset to a blank password. Not good. [Ed – Not a blank password – the…

Blog – meet PHP 7.3

Blog – meet PHP 7.3

Given I’ve recently been doing a lot of server-based stuff on the work front, I decided to share some love with this here blog by upgrading PHP to version 7.3. It really does seem to make a difference, performance-wise. Even though I’ve handled a few PHP 7.3 upgrades now, everyone is a little different, it seems. Here’s what happened this time: First, I added the repository reference

apt-get update failed, reporting a key error. I managed to get that one sorted using sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C then ran apt-get update again. All good! Then I tried installing PHP 7.3 using sudo apt install php7.3 php7.3-common php7.3-cli No…

Penang, remembered

Penang, remembered

A few months back we got a chance to escape to Penang, Malaysia for a few days. Been wanting to get there for a while but the stars hadn’t aligned, so to speak. It’s likely our only ‘out of country’ getaway this year so we made the most of it. We chose to stay at Doubletree Hilton Resort (Batu Ferringhi), as we were after the “resort experience” and this proved to have pros and cons. RM 1300 for four nights + 500 deposit which we blew through during our stay. 👍 Good pool, nice view from balcony with a glimpse…

Hello HTTPS

Hello HTTPS

Well, that was a bit of a shit-show and is the reason why I’d been putting it off for so long. Hey look, I got the green padlock! In summary: Grabbed an SSL cert using certbot, that all went smoothly. DNS issues are what caused a major headache. I had been using Cloudflare for ‘flexible SSL’ whatever the fuck that means, and the DNS propagations took a long time to flow through from namecheap. To add additional crap, DNS caches on my local machine seemed particularly hard to clear (Ubuntu 14.04 aka trusty). They even persisted through a reboot. Pesky…

Fiesta del Fifty

Fiesta del Fifty

I’m officially an old fart. I recently celebrated turning 50! The half-tonne in cricketing terms. A few years back I thought I wouldn’t make it – but I did! I threw a party at the house and I’m pretty sure it will be the last ‘big’ one I do so if you made it, be glad you were there! Shelled out for good food and booze, along with decorations and clothing from Amazon to match the ‘Mexican’ theme. No moths in my wallet for the few weeks leading up it, that’s for sure. It was an intimate gathering of 12,…

Upgrading to PHP 7.3 to improve WordPress TTFB

Upgrading to PHP 7.3 to improve WordPress TTFB

This is the hottest summer in Bangkok I can remember having sweated through. So I’m happy to be spending a Sunday afternoon in my air-conditioned home office working through various issues on my main client site in an effort to improve the dreaded Time-To-First-Byte (TTFB) issue. Thinking about it logically, WordPress is the issue here. Given the client’s site is on a VPN and ‘unmanaged’ (that means I manage it) I don’t have to content with troubleshooting the stack – although one of the first tasks I need to undertake today is to upgrade PHP to version 7.3 Firstly it’s…

List active WordPress plugins

List active WordPress plugins

Another win this week. I’ve needed this for some time – a way to list currently active plugins on a WordPress site. I cobbled the following PHP script together from fragments found on the web. You’ll need to edit the IP address at the top of the script. While there are other ways to lock down this script, this is my preferred method.

Here’s the output: (truncated) Click to enlarge Groovy! References Function Reference/get plugins CSS for table styling wprecipes.com -code inspiration

Finally – timestamps in h2o logfile

Finally – timestamps in h2o logfile

This has been bugging the shit out of me for ages and I found a solution today using the ts utility from moreutils. Here’s the error log directive in h2o.conf:

Now I have output which is much more usable. Take a look!

Road trip to Kanchanaburi

It was that time again (boy it rolls around quickly!) to head to the border and collect another 90 days – so under dark skies, we headed out of Bangkok on early Friday afternoon and made our way to Kanchanaburi, located near the border with Myanmar. The process has changed slightly from last time I was there. You now need to visit a ‘border agent’, pay your 960 THB before exiting the Thai side and are then herded into a minivan for the crossing, where you wait outside a makeshift duty-free store while all the passports are taken into the…

2 of 21
123456