It’s fair to say I read a lot. I love books and always have a few stacked up next to my bed for a quick (or long) read before I fall off to sleep. I also love books for work, since although there is a huge amount of resources on the web, published books distill expert knowledge, are peer-reviewed and are a great way to get a good overview of a particular subject.
I’ve been testing a website that generates images on the fly and in the past had used the less command to view the file contents, this helped see when PHP errors had unfortunately made their way into an image file.
However, sometimes when viewing a file I got the following error returned:
No identify available Install ImageMagick or GraphicsMagick to browse images
I’m pretty sure I worked this one out a few years ago, but had obviously forgotten. Turns out you can’t view binary files via a command like less!
The right way to view an image file is a command such as xxd. To view the top of a file (which usually points in the direction of the file format) use a command such as:
xxd /path/to/file.jpg | head
This command works just as well for text files, so will still pick up if PHP errors are inside the image file instead of the correct binary data.
Saving this one for later so I don’t forget again!
Well that was fun. A new episode of Sherlock is always something to savour, the feature length intellectually savvy TV series from the BBC that had a special pre-season four episode tonight.
Warning: here be spoilers..
Continue reading “Sherlock, 1895”
As I welcome the new year and type these words my kids are getting dressed upstairs, ready for a refreshing midday walk along Grantchester Meadows to lunch at the tearooms (with promises of scones). It’s been a busy year for me, but a very relaxing Christmas break, spent at home with the family just having fun. Which is my ideal Christmas, quite frankly.
Continue reading “New Year 2016”
PHP has just reached an incredible milestone, it’s 20 years old! On the 8th June, 1995, Rasmus Lerdorf released PHP 1.0. Now, 20 years later, PHP 7 is on the brink of being released and the language is stronger than its ever been before. With all the #20yearsofPHP stories around the internet I thought I’d add my own experiences and thoughts on how PHP has affected me.
Continue reading “PHP and me”
Another year, another blog post. It seems I only have the inclination to write as the new year comes in – probably just a symptom of being too busy!