Running multiple versions of PHP on Ubuntu

PHP 5.6 and PHP 7.3 on Ubuntu 16.04

I have a situation with the PHP websites on my Ububtu server. I would like to upgrade the server to PHP 7.3 but some of them may fail to run under that. Therefore, I am going to install PHP 7.3 whilst keeping PHP 5.6 as my default in Apache until I am satisfied I can safely switch and remove PHP 5.6. I actually upgraded the server from 14.04 to 16.04 earlier this year but kept PHP 5.6 and have not installed any 7.x versions. Getting Prepared for PHP 7.3 To start with I can confirm that I am running PHP

Upgrading Ubuntu 14.04 to 16.04

ubuntu upgrade

I previously upgraded an Ubuntu server from 14.04 LTS to 16.04 LTS (LTS = long term support) but didn’t document the steps. So this time I thought I would. This article has been a long time coming. I was lucky enough (depending on your view) to still have a server running 14.04 LTS as it is out of support now. I have Let’s Encrypt’s Certbot on this server so I will show what to do when that fails. Other non-Ubuntu-bundled installs will need attention after the upgrade too. Before starting make sure all packages are up to date. I have

Replacing the hostname on an Ubuntu web server

Switching Hostname

I have been running a server with a host domain name that had a top level domain of .TV. I didn’t realise but when sending emails from that domain name, even though it was legitimate the word TV is one of those SPAM key words that mail servers look out for. It’s OK if your email content scores lowly on the spammy word count but having one of those bad keywords in the domain name wasn’t helping. So, we dropped the name but I was using it as the host name on a server and needed to replace that. So

Setting up and testing free secure certificates

Free Certbot Secure Certificate

Do you want to apply secure certificates to multiple websites on the same web server? You want them to renew automatically? And want them to be free! Then read on. A few years back, one of my colleagues put me onto this process and I’ve been using it ever since and now I’ve documented it here. I look after a few Linux web servers on AWS and GCP. The administration overhead around purchasing new certificates, setting them up, renewing is time-consuming. It also costs money, although we always went for the budget secure certificates. That’s because all of the websites

Get a free Linux server with Google Cloud Platform

google-cloud-linux

After writing about the free (for one year) server available from AWS (see here), I thought I would write about a similar free server from Google Cloud Platform (GCP). There is one main difference between the two; Amazon provide a micro-server for 12 months for free as long as you stay within the allowable package where as Google provide you with a $300 credit that can last up to a maximum of 12 months. Amazon limits the free server instance for your account; 750 hours up-time per month (i.e. one continuously on instance), 1 CPU, 1Gb RAM and a maximum

Upgrade to PHP 5.6 on Ubuntu with GD library fix

PHP 5.6 GD

I’ve been running a couple of Ubuntu servers on AWS (not the free ones) for years that are still using PHP 5.5. Even though it is out of support I’ve kept with it. They host one of my old applications that I thought may be a problem on PHP 5.6 or later. I have two of these Ubuntu 14.04 LTS servers; one for test and one for production. I had a recent request to host another application that required PHP 5.6 as a minimum. These servers are under utilised so I went ahead and upgraded on the test server. Both

Get a free Linux server from Amazon Web Services

AWS free cloud server

I always have doubts when I see a claim that something is free but I needed to set up a server for a short period of time and have it publicly available for a few months. It will host three small demo applications and the number of users will be very low and their activity non-intensive. I really didn’t want to purchase anything as it’s for a non-profit or go through the trouble of setting up a more permanent solution as it has no reuse after this exercise. I knew AWS had a “free” tier and so I wondered if

Setting up a secure website certificate on an Ubuntu server

HTTPS Traffic

This article goes through the steps required to create and install a secure certificate on a website which will allow web traffic to be encrypted over https. The article uses the default website on an Apache 2 Ubuntu web server. It also mentions what to do for multiple websites each with their own secure certificate. It is part of my other articles on setting up an Ubuntu Linux server hosted using Amazon Web Services, but the same principals can be applied to any website on any server as the steps are the same. The starting point for this article is

Setting up a MySQL database on a Linux server

Setting up a MySQL database on a Linux server

This article goes through the steps required to create a MySQL database, a database user and give database permissions to that user. It also covered importing structure and data from a script together with a bit of information about creating tables and adding data. It is part of my other articles on setting up a “Ubuntu Linux” server hosted using Amazon Web Services, but the same principals can be applied to any Linux server as this article is just about using MySQL commands. If you do not already have MySQL installed then check out my previous article on “Setting up

Setting up scheduled tasks known as Cron Jobs on a Ubuntu server

Cron Jobs

In this short article, I will set up scheduled tasks known as Cron Jobs on a Ubuntu server. This will allow me to automatically run PHP scripts on the server at various points in time without any interaction. Any user account on the Ubuntu server can set up their own Cron Jobs which will run under their own account. If you want to make sure the scheduled task has full access to everything then it will need to run under a privileged account such as the “root” user and you can do that from a user account that has sudo