Archive for the ‘Life’ Category

Imagick not loading on MAMP for Mac

Thursday, January 17th, 2013 | Life, Tech

If you’re running MAMP and you’ve finally managed to get the Imagick extension to add ImageMagick support compiled, the battle may not be over yet. There are more things you need to do. You might get an error similar to the following.

Firstly, imagick.so was probably installed into the sytem’s PHP extension directory. So you might need to copy this into MAMP’s directory. Don’t just copy and paste the code below as you need to check the paths are correct for your system.

php -i | grep extension_dir
cp /usr/lib/php/extensions/no-debug-non-zts-20090626/imagick.so
/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/

Secondly, some of the libraries are out of date. You might get an error like the following.

[01-Jun-2012 08:46:22] PHP Warning:  PHP Startup: Unable to load dynamic library 
'/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/imagick.so'
 - dlopen(/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/imagick.so, 9): Library not loaded: /opt/local/lib/libjpeg.8.dylib
  Referenced from: /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/imagick.so
  Reason: Incompatible library version: imagick.so requires version 13.0.0 or later,
but libjpeg.8.dylib provides version 12.0.0 in Unknown on line 0
[01-Jun-2012 08:51:54] PHP Warning:  PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/yaml.so' - dlopen(/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/yaml.so, 9):
image not found in Unknown on line 0

We can solve this by editing a configuration file.

sudo vim /Applications/MAMP/Library/bin/envvars

Comment out the first two lines below and add the last one.

#DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH"
#export DYLD_LIBRARY_PATH
export PATH="$PATH:/opt/local/bin"

This should override out of date libraries such as libjpeg. If you’re still having problems, you can manually copy in the freetype library too.

cp /opt/local/lib/libfreetype.6.dylib /Applications/MAMP/Library/lib/

Though in theory this step should not be required. Restart Apache and you should see Imagick appear on the phpinfo() output.

Installing ImageMagick and Imagick on Mac OS X

Friday, January 11th, 2013 | Life, Tech

Trying to get ImageMagick and it’s PHP extension working on OS X Lion is a frustrating process. It will often fail and even if you try to configure it manually you may get an error like the following.

checking ImageMagick MagickWand API configuration program...
configure: error: not found. Please provide a path to MagickWand-config or Wand-config program.

First of all, install ImageMagick via MacPorts.

sudo port install ImageMagick

Now install the imagick PECL module.

sudo pecl install imagick

Very importantly however, make sure you specify the path when prompted, to be /opt/local, do not let it auto detect! Once this is done it should compile successfully and you will be prompted to add imagick.so to your php.ini file.

Twister

Thursday, January 10th, 2013 | Life

Turns out they’ve added two new things to Twister – a hands on the air result, and a “twister’s choice” result. It’s not like when we were young…

IMG_2399 IMG_2402 IMG_2404 IMG_2408 IMG_2410 IMG_2412 IMG_2414 IMG_2418

New Year’s Eve 2012

Wednesday, January 9th, 2013 | Life

For the fifth year in a row, there was only one place to be to properly ring in the new year. We had cocktails, sausage roles and Twister!

IMG_2348 IMG_2354 IMG_2361 IMG_2365 IMG_2366 IMG_2371 IMG_2378 IMG_2394 IMG_2435

Using whereis on Mac OS X Lion

Saturday, January 5th, 2013 | Life, Tech

Linux has a great tool called whereis that allows you to find the location of an executable. For example, if you want to know what PHP binary you are using, you could use the following command.

$ whereis php
/usr/local/php

However, if you run this on Mac it will often return you a black result, even though you know the command works!

$ whereis convert

The solution is to use which instead, which does the the same thing, but actually returns results.

$ which convert
/opt/local/bin/convert

Great for finding those extra mysterious programmes.

2012 in review

Thursday, January 3rd, 2013 | Life

As ever we saw out the year in style before going down the traditional route of having January at the start. I joined a gym (after getting free trials of one or two first of course) and got on a plane for the first time in over a decade. Meanwhile, we tried to teach retired people about social media and launched ZonePlay on PlanetWin365 at work. Mike even made a guest appearance at Wendy House.

In February it turned out Panic! At the Disco were still going while the Foundation launched Societas Pro, an open source community group management system, and launched Gift of Gloves – a warm clothing collection for people sleeping rough. Then there were as the usual celebrations – Valentine’s Day, Darwin Day, Copernicus Day and Galileo Day, not to mention Super Bowl XLVI. Yet, somehow, we managed to fit moving house into there too.

It was a busy month for the Foundation in March, when it launched the new Humanist Chaplaincy Network programme and distributing all the clothing we had collected. Meanwhile, I took Elina to Paris and we warmed our new house. Possibly the best season of Formula One in living memory kicked off, I finally made it down to the Leeds PHP User Group and some mysterious yellow ball started to appear in the sky once again.

It was all about business in April. After three years at Buzz, I left to set up Worfolk Limited, as well as Worfolk Games, taking up much of the month. But we did find time to celebrate Fonze’s birthday, try karting and host Martin Robbins to talk about Bad Science in the Developing World. I also finally found a solution to the immigration issue and achieved the unthinkable – I got a photo of Elettra smiling!

In May I gave my first speech at Toastmasters, while Gijsbert spoke about pacifism at West Yorkshire Humanists and A-Soc held its AGM. I learned everything Hugh knows in an hour and Worfolk Games launched Village Chief, a socially interactive strategy game on Facebook. ODDTV launched, there was a “Super Moon” and podcasting returned. Looking back, we probably saw the funniest image of the year here too. The month was rounded off with Know Leeds re-launching as a restaurant review site.

I narrowly avoided rehab by cutting my Foursquare addiction in June, we said goodbye to legendary writer Ray Bradbury and sat through a disappointing Eurovision. Worfolk Online had a busy month, launching Jenny’s Public Nude Photos and our first ever man on man gay site, Gay Men 365. I continued my Toastmasters career and went to Finland for the first time, only to find out that Moomin World didn’t open until the week after. At least I did get to enjoy some alcohol free Rekorderlig though. The month finished out with me becoming treasurer of West Yorkshire Humanists. There was some kind of football competition as well.

I spent some time baiting scammers in July, grabbed the Worfo.lk domain and launched Wing Commander, a library that adds Mustache support to the Flight microframework. We found out Jesus was feeling the recession while Worfolk Online launched it’s first ever foreign language site, a Swedish site called Nakna Hemmafruar and soon followed it up with a Finnish one called Alastomat Kotirouvat. I won my first best speaker ribbon at Toastmasters for my talk on legalising drugs and saw Blink-182 after a year of waiting. Authority Forums relaunched, everything flooded and the Olympic torch passed through Leeds. A quick bit of researched showed motor racing as the sport Brits are best at and Worfolk Online celebrated a decade of running websites. Danny Boyle stunned us all with his magnificent opening ceremony and my website experienced it’s biggest ever traffic surge after my adjusted medals table went viral.

The month of August started with a thrilling few weeks of sport as Britain dominated the competition in the Olympic medal table (China and the US being too far ahead to count as competition) while we started the month by eating a mixed grill in a burger while I baited some more scammers. Gangnam style ran rampant in my head a month before anyone else jumped on it thanks to a tip off from Michelle and I launched my american football blog, A Brit Talks Football. I attended White Rose Speakers for the first time, we said goodbye to Rich as he left for London and the Foundation staged the 2012 Worfolk Lecture. Leeds celebrated Pride 2012 and we said goodbye to Neil Armstrong. I touched down in Ireland for the first time, when I took Elina to Dublin for the bank holiday weekend.

Elina knitted a Dalek in September and we found a new contender for the best steak house in Leeds. Humanist Community changed its format and my new proximity to Elina meant we could now go for ribs for lunch (although, to be fair, we had been doing this anyway). I won the club level humorous speaking competition and went on to win the area competition too. We also started our photography course and the NFL season kicked off (more importantly, I cared, for the first year ever).

In October we discovered a hidden gem in the form of Miah’s Kitchen Indian restaurant and we tried wagyu steak for the first time. Team Europe staged a record breaking comeback in the Ryder Cup, Full Tilt Poker relaunched and I got my new and super awesome laptop along with Apple TV. I attended the PHPNW12 Conference and once again ticked over another year – a good excuse to finally drink the bottle of champagne I’ve been moving around since Buzz’s first product launch. I finished off the month by travelling to Donington Park to compete in the division level competition of the humorous speaking contest.

I spent a lot of November playing with my new lens, but did find time to attend the 2012 North West Humanists Conference. I went to Manchester to see Evanescence and the Foundation launched the 2012 Holiday Food Drive and as part of International Men’s Day, our Men’s Issues campaign as well. The Humanist Action Group also published a new guide for running food drives, while the United States reelected Obama and we attended GRAM 2012. Living out our dreams, myself, George and Matt went training with the Yorkshire Rams and myself and Elina attended the Finnish Christmas Carols concert in Headingley, while the Formula One season finished in style at Brazil as living legend Michael Schumacher announced his retirement.

We finished off the year, as is traditional, with December. This involved partying for George’s birthday and finishing our photography course. I took on the role of Toastmaster for the first time and A-Soc held it’s traditional Winter Solstice Meal. The Humanist Action Group successfully completed its 2012 Holiday Food Drive, raising £2,849.15 worth of donations for local homeless shelters and we went to watch the Leeds Celtics play. America had it’s traditional holiday season massacre and that whole Christmas thing happened.

Sarann’s birthday

Tuesday, January 1st, 2013 | Friends, Life

A few weeks ago, we went to Hansa’s, to celebrate Sarann’s birthday.

It was a rather intimate affair, with most people away for the holidays, or possibly refusing to eat at a vegetarian restaurant, and indeed the restaurant itself was rather quiet, despite it being the last Saturday before Christmas. Though there is much debate to be had as to whether this causes people to eat out more or less (probably depends on what disposable income bracket you fall in to).

The restaurant serves “Gujrati Vegetarian Cuisine”, the result of which was that I didn’t really know what I was eating. So me and Elina both went for the thali, which is an entire meal on a plate (similar to a bento box) and at every option I took option A and Elina took option B – then we just swapped around based on what we figured our we liked.

Heating

Sunday, December 30th, 2012 | Life

Those of you who are familiar with Maslow’s hierarchy will know that warmth, comes right at the bottom, on level one, along with food and shelter. It, therefore, seems quite odd to me that we don’t take it particularly seriously.

Take our apartment for example. It’s too warm in the summer (so much so that they felt the need to install an air conditioning unit) and too cold in the winter. So was my last apartment, and the house I lived in before that. In fact, here is me moaning about it in 2008. My parent’s house and student halls seem to be the only places that were ever capable of properly regulating temperature.

I was quite hopefully when we moved into a posh, very well furnished apartment in February, that we had finally found somewhere that was properly heated. It had a fancy system where you could set your temperature range and it would do the rest.

But, after months of fiddling with it, we don’t seem to be able to make it do what we want to do. How hard is it to maintain a constant temperature? It’s not like we moved into an old build, Nest was probably already around when they furnished the place.

Worse still, the very design of the building is just stupid. The radiator is right next to the bed, rather than below the window. This means when it is on, it blasts Elina’s head with heat the whole night while her feet, down the other end of the bed, are cold because of their proximity to the window. You have to go out of your way to design a system so badly.

Not to mention that all of this is on electric heating, so costs us three times as much as it should.

Roll on Gene Roddenberry’s glorious future, it might be socialist, but at least you will be able to set the temperature of your quarters.

Updating phpMyAdmin on MAMP Pro

Sunday, December 30th, 2012 | Life, Tech

The phpMyAdmin that ships with MAMP Pro is now seriously out of date, so you’ll probably want to upgrade to the latest version. You can do this in a couple of easy steps. Firstly, download and uncompress the latest version of phpMyAdmin. I did it to my Desktop. Then, open up Terminal and enter the MAMP Pro folder and rename (best to rename rather than delete) the current phpMyAdmin.

cd /Library/Application\ Support/MAMP\ Pro/
mv phpMyAdmin phpMyAdminBackup

Next, copy in the new version of phpMyAdmin.

cp /Users/you/Desktop/phpMyAdmin-x.x-all-languages ./phpMyAdmin

Finally, you need to set up the configuration for the new phpMyAdmin.

cd phpMyAdmin
cp config.sample.inc.php config.inc.php
vim config.inc.php

Change the authentication type and add a username and password entry to the file.

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';

If you’ve changed the MySQL root password on your MAMP Pro, you’ll need to enter the new password instead.

Once done, save the file and you’re done.

Day off

Tuesday, December 25th, 2012 | Life

What do you mean I can’t come into work today?!?!?