Andrew McCombe

Full Stack Web Developer

HEAD request with PHP

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

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.

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.

20 years of PHP #20yearsofphp

On 8th June 1995, Rasmus Lerdorf announced the release of Personal Home Page Tools Version 1.0. To celebrate the 20th anniversary, Ben Ramsey has asked the PHP community to share their PHP experiences and share them on Twitter using the hashtag #20yearsofphp.

Here’s my story.

Ignore PHP Strict Errors and Warnings

After upgrading to PHP5.4 on one of our older code-bases I’m finding the error logs full of PHP Strict Errors and warnings. As this code is old and not financially viable to fix all these issues I needed to ignore the errors and warnings.

Quick Tip: PHPstorm Find and Replace Regex Dollar Sign ($)

If you need to perform a Find and Replace with a Regex in PHPStorm and want to replace a dollar sign ($) you’ll need to escape it with a double slash

Fix for PHP ‘ Warning: Invalid argument supplied for foreach() in …’

Whilst working on a legacy project* at work I’m getting lots of pages with the PHP warning “Warning: Invalid argument supplied for foreach() in …”. The warning is showing because I like to develop with error reporting turned on.

How to configure postfix to deliver all mail to one mailbox

How to configure postfix to deliver all mail to a local user account

Vagrant PHP and PuPHPet is the Dogs Bollocks!

In The Beginning… I’ve been a PHP Web Developer for a long long time and have spent many hours setting up development environments in order to practice my trade. From full blown towers running full cdrom installations of RedHat 6.2 through to a laptop running FreeBSD and then Slackware. I used to compile the LAMP […]

PHP imagick ImagickException no decode delegate for postscript or PDF files

This morning I had an issue with a PHP imagick ImagickException when converting a PDF/postscript file to a thumbnail. I have PHP Imagick, Imagemagick and Ghostscript installed and everything verifies as OK in phpinfo output.