Andrew McCombe


Magento Certified Website Developer

HEAD request with PHP

If you want to perform a HEAD request with PHP on an URL you can use the `stream` functionality…


Managing Homebrew Services

Homebrew is easy to use and makes installing services such as MySQL or Elasticsearch a breeze. Here’s how to manage those services.


Fix for PHP Composer “????%” issue

I’ve had a problem on a few older projects where composer dies with “????%” after running `composer update`. Here’s the fix.


Introducing Hit The Ground: Laravel Edition

I had the idea a while ago of creating a basic starter app containing the boilerplate code needed to get started on an idea – so here it is. Introducing my Laravel Starter App – Hit the Ground.


MySQL Foreign Key Tutorial

Here’s a quick tutorial on creating foreign keys with MySQL.


Solved: PHP Imagick ‘unable to open image’ PDF

I’ve recently stumbled across an issue where PHP Imagick can’t open a PDF file despite the file being there and readable. This is using Mac OSX El Capitan with Homebrewed PHP5, Imagemagick, Ghostscript and the PHP55-imagick module. After a bit of searching I found the fix.


TIL: MySQL FLUSH PRIVILEGES isn’t needed

Today I learned that `FLUSH PRIVILEGES` isn’t needed by Scott Lindsey in the comments. After double checking locally that Scott was correct I looked it up and found a great explanation why MySQL FLUSH PRIVILEGES isn’t needed


MySQL fix: Field ‘xxxx’ doesn’t have a default value

I’ve recently been working on a few of our older websites with newer MySQL installations and am coming across the following error:

SQLSTATE[HY000]: General error: 1364 Field ‘delivery_address_id’ doesn’t have a default value

This is caused by MySQL having a strict mode set which won’t allow INSERT or UPDATE commands with empty fields where the schema doesn’t have a default value set.
There are a couple of fixes for this.


Useful Oh-My-Zsh plugins

Oh-My-Zsh describes itself as a ‘community driven framework for managing your zsh configuration’ and comes with lots of zsh plugins (189 currently) but none are enabled by default. Some zsh plugins are tailored for your specific operating system whilst others are aimed at helping improve developers workflow. Wether you’re using Ruby, Python, PHP or Javascript as your main language or you’re a systems administrator, there will be a plugin to help. Here are the zsh plugins I’m currently using.


How to pear install HTTP2 and HTTP_Request2

Whilst working on a project recently I’ve found the need to install the HTTP2 package from the pear repository. I couldn’t find any useful notes on how to install HTTP2 via pear so here’s my notes on how to pear install HTTP2.