3arcade PHP game script updated to version 2.1 to work with PHP 5.6

I have an installation of the 3arcade script that’s still in the wild, and decided it was time to update it to work with PHP 5.6 (at least).

These changes fix:
– a row 0 error in play.php linked to deprecated functions
– deprecation of the ereg_replace function through use of intval
– deprecation of the mysql_connect function (and future deprecation of mysql* functions) through use of PDO
– consistency of database connection and query errors with a variable in the config file

Changes live at https://github.com/withdave/3arcade

Upgrading PHP to 5.6.x or later on CentOS7 via Yum and the IUS repo

CentOS7 (and some of the other RHEL flavours) currently don’t include PHP 5.6+ in the core repos, and yet the versions of PHP bundled are at EOL or close to it.

A number of guides suggest using the webstatic or remi repos – but this is not recommended as they contain packages with names that conflict with packages in core repos.

One of the better options is to use the IUS repo (Inline with Upstream Stable project), which means you can quickly and easily update.

First, install the IUS rep (you will need the EPEL repo if you haven’t got it already)

yum install https://centos7.iuscommunity.org/ius-release.rpm

Next, we install, then use yum-plugin-replace to replace the existing PHP package

yum install yum-plugin-replace
yum replace --replace-with php56u php

Finally httpd should be restarted, and you should be good to go

service httpd restart

DigitalOcean has a more detailed post on installing PHP7 from the same repo.

After creating a new user in MariaDB / MySQL, flush permissions and MYSQL_SECURE_INSTALLATION

After installing LAMP on new servers (similar to as described here for CentOS), I’ve recently had two errors after the creation of MySQL users.

These user accounts required additional steps after creation – flushing permissions, and re-running the MySQL secure installation.

Continue reading “After creating a new user in MariaDB / MySQL, flush permissions and MYSQL_SECURE_INSTALLATION”

SEATT updated to 1.5.0

Simple Event Attendance has been updated to 1.5.0.

Update to fulfill some of the requests posted at https://withdave.com/2017/05/seatt-feature-request-may-2017-update/, as well as some other fixes:

  • Updates to structure of comments in source files to improve readability
  • Addition of list format to make displaying multiple events easier
  • Change to remaining time display in the admin panel (from hours to a formatted time)
  • Removed use of extract function from add_shortcode (seatt-list and seatt-form) as per best practice
  • Added ability to use shortcode to control public visibility of comments
  • Updated screenshots for plugin

Plugin is live on wordpress.org.


DateTime with no DateTimeZone set in PHP.ini with ffmpeg and ClipBucket

I’ve been exploring how to generate videos on the fly through use of packages like ffmpeg (I installed this the other day), and recently tried out ClipBucket (a free video site script).

ClipBucket is a little rough around the edges, but has a load of great features, has a relatively active community, and large parts of the code are on GitHub.

It’s easy to setup, but I wasn’t getting thumbnails through ffmpeg for any of the uploaded videos. Instead I was getting:

Response : Oops ! Not Found.. See log

Command : /usr/bin/ffmpeg -ss -i /var/www/html/files/...

Invalid duration specification for ss: -i

Searching the web returned no results, so I’m posting this as a record.


The Culprit

The culprit was the casting of time, which is used when a duration is available.

It uses the following line in ffmpeg.class.php:

$d = new DateTime($d_formatted);

And on my server, this threw an invisible exception:

DateTime::__construct(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.

The DateTime construct gets rather unhappy when it doesn’t have a default timezone, and it turns out I’d neglected to put a default timezone in PHP.ini. Just a quick change in PHP.ini to:

date.timezone = Europe/London

Restart Apache and we’re good to go. Oops.

Another option for this is to set the timezone in the PHP code, but it should still be set at the server level:

$d = new DateTime($d_formatted, new DateTimeZone('Europe/London'));


INACCESSIBLE_BOOT_DEVICE, courtesy of Intel Rapid Storage Technology drivers (

Note to self: do not update Intel Rapid Storage Technology drivers on a HP Proliant ML10v2, unless I really, really need to.

I’ve become complacent when throwing drivers at devices and this is a reminder how easy it is to break things. I recently added a TPM to one of my servers and one of the fixed drives is classified as removable by Windows, which means I can’t use the TPM with it. There’s at least two ways to fix this, either install Intel RST drivers and configure it through the console, or change some registry keys to force them to fixed drives.

So – download Intel RST version (the latest one that I thought was compatible), install, and reboot.

Restarting takes ages with a server BIOS, and you’re unlikely to have it hooked up to a display, so I had to jump into the iLO console to work out why it hadn’t started. After a reboot, all I had was the Windows logo, the spinning wheel, and shortly after a:


Restarts will yield the same result, even on safe mode, I didn’t have access to restore points, and the startup repair was also fruitless.

A fair while later I stumbled across this brilliant blog post which eventually provided success through:

  1. Restoring an earlier driver version as per the post
  2. Using the “Use last known good configuration (advanced)”, which managed to remove the BSOD.

All in all, much of an evening wasted by a single driver.

Mapping UK Highways Agency traffic data in PowerBI Desktop

I downloaded the May 2017 version of PowerBI desktop to load in some of the traffic data that I dropped into Qlik Sense and Tableau in a previous post.


The finished article first


So – back to getting started. This is my first time using the software, and it’a pleasant experience right up until I try to load an .xls file.


A missing driver? Already?

Continue reading “Mapping UK Highways Agency traffic data in PowerBI Desktop”