Mounting the VMWare Tools Installation CD

I was recently installing the VMWare tools onto a debian etch virtual machine which I downloaded from the thoughtpolice.co.uk site, and I ran into problems. When the installation instructions from thoughtpolice say to type

mount /dev/cdrom /mnt/

This gives me an error about “You must specify the mount type” or similar. I found that actually you should type:

mount /dev/cdrom

and see the disk appear in /media/cdrom0. Thanks to this article which helped me out (I am pretty sure its the same one that helped me last time we had this problem as well!).

Tinyurl Shortcut in Opera

I am an irssi user – I have issues with mice (I don’t use one) and so the text-based IRC client works wonderfully well for me. It also looks less like a chat client and more like I might be working on a terminal screen, which was more useful before I worked from home. In most of the channels I frequent, there is a bot (Phergie to be precise) which turns URLs into a Tinyurl link and also posts the page title.

Opera has a neat little trick (I hear firefox also now has something similar) where you can right-click in any search box, and save the search as a shortcut which you can then use in the address bar. By default this includes google so you can type: g cowsay to do the equivalent of typing “cowsay” into the search box on google.com. I usually add a few more searches to it – and one of them is for tinyurl, using the search string http://tinyurl.com/%s.

So when I see a URL in a chat session, I can just wait for the tinyurl, then type t followed by the 6 or so digits on the end of the tinyurl to get to where I’m going – very handy!

Schedule for PHPNW

Today saw the publication of the schedule for the PHP North West Conference – you can see it in full on their site. There are some great speakers lined up – Johannes Schlüter, Rob Allen and Stefan Koopmanschap to name just a few that immediately jump out of the page. Tickets aren’t on sale yet but will be in the next week or so – I know I won’t be missing out on this event :)

Excitement at Ibuildings

I didn’t post much of a wrap-up after ZendCon – partly because that trip ran into the start of another one and I only got home properly yesterday, and partly because something happened in California that I couldn’t talk about until now. One thing I did want to mention is that I gave a session in the unconference while I was there. I spoke jointly with Matthew Weier O’Phinney – despite any previous panicking I may have done about talks, I had very few nerves this time around and really came away feeling quite inspired about speaking in general. We signed up for the slot the day before (many thanks to whichever people were involved in conspiring to get me to do this), put a few slides together over breakfast, and took it from there with surprisingly good results.


(this is us drinking, rather than speaking, obviously)

Back to my ZendCon story. A few weeks ago, my employers Ibuildings announced their PHP Centre of Expertise which we will be building up. Its an initiative to support the wider PHP ecosystem, particularly because so many key PHP community people and contributors are employed at Ibuildings. I’m not usually a big fan of towing the company line on personal blogs, but this story is important to me.

ZendCon finished on the Thursday lunchtime and after a long afternoon hanging around outside and acquiring some really impressive sunburn (English complexion, Californian sunshine, yes I know I should know better!), the Ibuildings people present at ZendCon went out for a meal – with the table booked for one extra person. When Cal Evans walked in the room, I was delighted to see him, and wondered for a moment if he had just popped in for some beer and chatter – but I was completely and wonderfully wrong! Cal is the Chair of the PCE – so he’ll be my colleague within a few weeks!! I have known Cal for perhaps two years now, he’s a great supporter of phpwomen.org and I count him among my personal friends. Having him move halfway round the world to work with Ibuildings on such an exciting project makes me very optimistic at the thought of things to come. This is Cal and I at the conference:

Ibuildings is often recruiting, and it seems like many friends have joined the organisation already. Could anyone looking for a job with Ibuildings please note that we do have a bonus for employees recommending friends … ?

My Sister’s Graduation

Yesterday I attended my little sister’s graduation ceremony – she has a BA in Early Childhood Studies from University College Birmingham and I am so proud of her I can’t actually express it! She’s worked hard to get to here and the path was not always smooth. I uploaded a selection of pictures from yesterday to remember the day by.

I’m also very pleased to have been able to be here to cheer her on and also very pleased that we now have the sequel to a photograph taken at my own graduation day 5 years ago.

One in the gown, one in the hat One in the hat, one in the gown

Well done, little one!!

Update from ZendCon

I’m currently in California, at ZendCon. I’m having way too much fun to blog but there is a writeup on the phpwomen site of my experiences so far. I’ve met some great people, and its long days but I’m learning a lot! I’ve (been) volunteered for an uncon session later on today, at 5:15 I’ll be speaking alongside Matthew Weier O’Phinney on “Subversion Tips and Tricks” – if you’re here at ZendCon then drop in and say hi.

For everything else, see the zendcon photos on flickr! http://www.flickr.com/photos/tags/zendcon08

Using curl and PHP to talk to a REST service

Having recently written articles about curl and about writing a PHP REST server, I thought I’d complete the circle and put here a few notes on using PHP’s curl wrapper as a Rest client. Also I had to look some of this up when I needed to actually do it so next time I need only look in one place!

If you don’t know about PHP, Rest, or curl, then I recommend you do a little reading around each of those subjects before reading this as its unlikely to make much sense – I’m not including background on these topics as there are better resources elsewhere.

I’ve written about using curl before from the command line, but this example uses PHP’s curl to access the service. This is just a simple example, but hopefully if you are doing something along these lines you can adapt for your needs.

In the example, we set the URL we’d like to call and initialise the curl object to point to that. Then we create an array of post data, and configure curl to use POST to make the request and to use our data array.

       $service_url = 'http://example.com/rest/user/';
       $curl = curl_init($service_url);
       $curl_post_data = array(
            "user_id" => 42,
            "emailaddress" => '[email protected]',
            );
       curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
       curl_setopt($curl, CURLOPT_POST, true);
       curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data);
       $curl_response = curl_exec($curl);
       curl_close($curl);

       $xml = new SimpleXMLElement($curl_response);

We execute the request and capture the response. Health warning: by default curl will echo the response (for reasons that aren’t clear to me), if you want to parse it then you will need to use the CURLOPT_RETURNTRANSFER flag to have curl return the response rather than a boolean indication of success – this fooled me completely for a while, I have no idea why it works this way. As you can see I’ve parsed the resulting XML and my script can then continue with the data it acquired. Depending what you need to do next, you can manipulate the SimpleXMLElement object as you need to.

If you’re working with PHP and services, then hopefully this will get you started, if you have any questions or comments, then please add them below!

PHPNW Update

With just over a week remaining on the PHP North West Call for Papers, plans for this Manchester-based conference are fairly racing along. The call for papers closes on 21st September (in time for me arriving home from ZendCon so we can make some decisions before I shoot off again). So far the submissions have been of a very high quality and I’m really excited about this event. In addition we have confirmed Derick Rethans as one of the keynote speakers, more details about that on the PHPNW site itself.

Tickets will be on sale somewhere around the end of September or beginning of October, and we’re already finalising some of the sponsorships – thanks so much to the companies who are getting involved in the event. So many of them are really adding to the experience as well as just buying advertising space, its giving the event a very special feel. I’m looking forward to seeing at least some of you in Manchester on November 22nd!!

Crochet Tutorial: Granny Square Round 2

Here’s the last in the crochet tutorial series, showing how to fit a second round of granny square onto the existing “granny’s daughter” that we made previously. I’ll have to take some photos of stuff I’ve done with this pattern to give you some ideas of what can actually be made from this very simple pattern piece. Anyway, enough waffle, here’s the video:

If you get this far – definitely let me know :)

Acer Aspire One and an XD Card

I may have mentioned my new acer aspire one already, and I probably also mentioned the problems I had with it not reading my camera card. The camera is a Fuji Finepix, and the card is a 2GB XD card – XD is the format used by Fuji and by Olympus apparently.

Well, we went back to the shop and demonstrated the card not working. They took the card, tried it in their card reader (it worked, just like it does in my card reader and in the camera). Then they tried it in the display model of the same machine, and it persisted in not working. After a whole rigamarole of contacting the supplier, who told us to contact the retailer, who told us to go home and ring their central helpline, who told us to contact the supplier (which went on for a while) we went back to the shop again and they got a new XD card, and it worked absolutely fine. The new card is a 2GB card just like the old one.

Things I notice about this:

  • The old card doesn’t work even after formatting
  • The camera boots MUCH faster with the new card in it
  • I have no idea what could cause that

Anyway, I take it all back, XD cards do work with the linux acer aspire ones – and now I’m all set for being able to upload photos from my trip to ZendCon next week.