Install ImageMagick and imagick on Mac OS X Lion

If you’ve ever done any sort of image processing in your PHP applications, you’ll start to realise how limited you are when using native PHP commands such as createimagefromjpg etc. It eats your web servers memory! Nowadays, what with people carrying 5 Megapixel cameras in their phones, uploading and resizing a photo can be areal strain on resources, especially if several users on the website are doing it at the same time.

To get around this conundrum, there is a PHP library called imagick which allows you to access a program called ImageMagick. ImageMagick runs natively on the machine, and is available for Unix, Linux, Mac, and Windows, so running it shouldn’t be a problem. The only thing to take into consideration here is whether your hosting providers PHP has imagick available. If not, depending on your hosting package you may be able to SSH into your server and install it.

ImageMagick can do all sorts of crazy image editing things, and can handle pretty much whatever you throw at it! Find out more here:

Anyway, looks good, so let’s get cracking! If you have been following my posts you’ll see I upgraded my PHP from the old version that ships with Lion using ports. I’m also going to use ports to get ImageMagick.

sudo port install ImageMagick

This will take up to ten minutes! It gets all its dependencies, configures, and compiles from the source code specifically for your computer’s setup. Once it’s done there are several commands you can run from the terminal:


For more info see

Now that we’ve done that, we need to install the imagick PHP library that accesses it.
Depending on your luck this may work straight away for you:

sudo pecl install imagick

When it asks for the prefix, type it /opt/local.

If it fails to install, you are probably running PHP 5.4 like me. In this case, you need to tell pear to use the latest beta, which WILL compile.

sudo pear config-set preferred_state beta
sudo pecl install imagick
sudo pear config-set preferred_state stable

Last but least you should add “” to php.ini, and restart apache. Boom! now we have a very powerful tool for image manipulation!

Update: If you get this error – Please provide a path to MagickWand-config or Wand-config program.
Then – ensure “ImageMagick-devel” and NOT “ImageMagick” package is installed instead


Totally Free Bitcoin!

I went to buy a Bitcoin. At £20. But I had to set up a transfer from the bank and wait for paperwork. Eventually it came. Bitcoin was now £60! Looks like I missed my boat. And I’m still missing the boat, it’s now at £92 and climbing!

Anyway, I then thought about it. If Bitcoin really is the future, then we should try and get some. Market analysts have speculated that Bitcoin could possibly capture up to a tenth of the world market! Remembering that there are only ever going to be 21 million Bitcoins in circulation, that would price a single Bitcoin between £100,000 and £1,000,000 !!! A million quid? Per Bitcoin?

So given that these darn things are rarer than hens teeth, it really is surprising to me that there are these things called Bitcoin Faucets, which are still operating!

Originally conceived as a way for miners to distribute wealth in order that more people adopt Bitcoin, these sites offer you Satoshis in exchange for you viewing a webpage full of adverts! Usually the vibe is to fill in a captcha, paste in your Bitcoin address, post the form and wait for your free money!

So since the normal bank took too long for me to buy some bitcoin at a reasonable price, I messed around with these sites to check it out? The result? My Bitcoin account now has 0.039BTC. Highly unimpressive looking, until you realise that this is actually £3.61! Just imagine, if the entire world ran on nothing but Bitcoin, then 1 BTC would equal one twenty-one millionth of the entire worlds wealth! So it’s the wild west and theres a Bitcoin Rush! Download yourself a wallet from MultiBit ( and then visit these sites to get completely free Bitcoin!

totally free bitcoin
Free Bitcoin Galore!

12 Hour Faucet
Awesome payout! But doesn’t pay you until you have visited enough times to collect 0.01 BTC (89p at time of posting this)

24hr BitVisitor
Good payouts.Visit 5 websites for 5 mins each (play guitar or something between).

24hr NetLookup
Good Payouts again. Paste in your address!

24hr Bitcoin Addict
Another good one, jackpot prizes of 0.01!

24hr BitHits
Submit your address! Then go back a page and do it another twice! (3 in a row max per day)

24hr Bunny Run
This one gives better prizes away if you can guess the Winning Bunny, 1st place 0.0001

1 hr Daily Bitcoins
Dishes out 0.00001 unless you check coming prizes then refresh the page like a madman on that particular minute! The you can win up to 0.01!
Also gives random PeerBet credits out, which you can gamble and withdraw winnings to your account!

1 hr Coinad
Exactly the same vibe as Daily Bitcoins, minus the Peerbet credits

1 hr El Bitcoin Gratis
En Espanol! Hourly Faucet

1 hr El Bitcoin Gratis
Same as above, in English

24hr BitCoiner
Best thing to do is save up then send all at once to save on transaction fees

1 BTC Faucet
Be Fast or Be Last! This thing takes ages to fill up, then its fastest finger 1st to withdraw! Currently sitting at 0.3something BTC

24hr Cointicket
Paste n Go!

24hr CoinReaper
Sort out a captcha and get your daily hit of BTC