Andrew McCombe

Full Stack Web Developer

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.

Install PHP and Mysql on OSX Mountain Lion

Install PHP and Mysql on OSX Mountain Lion I usually develop on an Ubuntu VM running in VirtualBox but have needed to install PHP and MySQL on OSX Mountain Lion on the MacBook Pro. Here’s a Github Gist from Aaron Brady with details on how to do it.

Restart Apache on Mac OS X Mountain Lion

This is here for reference as I keep forgetting how to restart apache on Mac OS X Mouintain Lion. Here’s how to do it:

Enter password and you’re done. You can also start and stop Apache by using the ‘start’ and ‘stop’ parameters: