Sunday, February 5, 2017

What to do when Wordpress gets stuck on "Unpacking the update"

The other day I noticed that the auto-update for a particular Wordpress installation had stopped working. I decided to log in to the blog and do the update manually, only to have the update process get stuck displaying a message : "Unpacking the update".

I remember experiencing something similar to this before, so had a good idea what to try.

Logging into my WHM control panel, I went straight to the PHP Configuration Editor (in the Service Configuration section) to check the memory_limit value. It was set to 64 - suspiciously low. I doubled it up to 128, saved and tried the Wordpress update again. This time it worked without a hitch.

Monday, December 5, 2016


While dealing with some copy and pasted code from somewhere, some unexpected errors were appearing.

Example Code:


$link = mysqli_connect("localhost", "root", "mysql", "test");


Would result in the following error:

Parse error: syntax error, unexpected '"root"' (T_CONSTANT_ENCAPSED_STRING) in ***file path***\test.php on line 5

After some investigation it turner out that the incorrect file encoding was being used. Switching to UTF-8 revealed the following:


$link = mysqli_connect("localhost", "root", "mysql", "test");


There were "bad" characters instead of spaces. Changing them fixed the problem.

Wednesday, July 13, 2016

How to set the default timezone in CodeIgniter

Working on updating a project from a 2.x version of CodeIgniter to version 3.0.6 I needed to change the default timezone for the site. Trying to take a shortcut I saw the $config['time_reference'] variable in config.php and changed it from the default "local" value to a PHP timezone of my choice. Needless to say, this did not work - I'm actually not sure what it even did. I'm not sure why, but not having time to fiddle with it I managed to set the default timezone by adding "date_default_timezone_set('MY TIMEZONE');" to the top of the config.php

defined('BASEPATH') OR exit('No direct script access allowed');

date_default_timezone_set('America/New_York');//set timezone

Monday, March 7, 2016

Outlook freezes when trying to reply to certain e-mails

This one was tricky, with a handful of our customers complaining that when they tried to reply to e-mails that originated from our website their e-mail clients were freezing. After a lot of back and forth I figured out that the e-mail client was MS Outlook, so started digging around for reports of other people having the same or similar issues. After a while I discovered that on certain versions of Outlook when the configured e-mail editor was MS Word, trying to reply to certain messages that contained images would cause a problem in the editor which resulted in Outlook freezing.

The suggested solution :

- Firstly make sure that Outlook has the latest possible updates.

- If the latest updates don't resolve the issue, something that can be checked/tried is to not use Microsoft Word as your e-mail editor. To do this, in Outlook, go to tools > options > mail format. Un-check "Use Microsoft Word to edit email messages.". (You can always re-check the option if it makes no difference to the problem)

Hopefully this fixes the problem.