Skip to content



Well, I'm finally back from my conference run. Despite some shortcomings with hotel 'net connections, nothing went badly.

One thing I'm particularly pleased with is that I got to write some code (feels like a long time since I had the luxury to write pleasure code). I'm about 50% of the way through a libffi extension for PHP 5 (the ffi page is out of date, but still relevant).

FFI is an acronym for Foreign Function Interface and it provides a portable way to make calls from PHP into C code (and vice versa) at run-time, without having to write glue specifically for the function being called at compile-time.

PHP already has a w32api interface (unmaintained and broken) that does the same thing but for windows; my ffi extension replaces it and will also work on other platforms (Linux, Darwin, SunOS, Irix, Alpha, m68k, PowerPC and Arm).

Not only can you map functions from shared libraries (and DLLs), but you can also define structured types and access them using a natural syntax (taking advantage of the new OO internals in ZE2).

Even better is that you will also be able to pass PHP functions directly to mapped C functions that take callbacks as parameters (like the C library function qsort).

This all sounds really cool, but there is a price - allowing a PHP script to do this stuff is extremely dangerous (hence the title of this entry), so you won't find it on shared hosters.

Starting to talk

The biggest drawback to going to conferences is that I'm missing my wonderful wife Juliette and our son Xander. Xander is 11 months old and has been chatting away saying na-na for a few months now.

Since I've been away on this trip, he's started to say da-da and today he said ma-ma. Thanks to the wonders of technology, Juliette was able to make a quick mpeg so that I don't feel that I'm totally missing out. This brings tears to my eyes because Xander isn't feeling very well right now (he's having trouble keeping his food down), so he doesn't look quite so bright as he does usually.


PHP{Con West

PHP{Con West went very well for me - I got to meet most of the other PHP guys that I haven't seen before, as well as some of the familiar faces from LinuxTag this year, and got to meet some Sams authors, and Shelly too (at last!), as well as a bunch of PHP users.

The Extending PHP tutorial seemed to go well - there were more people at the end than there were at the start, and people were asking the most relevant questions, so it seems that I didn't bore the socks off everyone.

I will be putting the slides from the session online in the next couple of days because I've only just gotten some sane connectivity, which leads me to the down side of the conference...

For a hotel based in Silicon Valley, you might expect the Biltmore to have good internet access... well, it did have WiFi and it did have an elaborate code system to ensure that you are paying for access. The problem was that they didn't have anywhere near enough bandwidth for a computer/networking based conference. The number of attendees completely overwhelmed their line.

About time I upgraded...

As development zoomed forwards on jBlog, the name changed to Serendipity and now it is 0.3 releases down the road.

So, it's about time I upgraded, and at last, I have.

I've been waiting for a stable release for a little while, because I knew I didn't get that much time to spend on the blog, and I didn't want to have to play catch-up from a development release with no real point of reference.

This latest release feels much more solid than my old jBlog, doesn't look too dissimilar from my original style sheets, and is actually quite nice to use.

Good job Serendipity Team!

Partnership with

This little gem was posted to the PHP security@ alias, which is intended to provide a means for confidential disclosure of critical security problems in PHP to us, the PHP developers.

To: Subject: Partnership with


I visited your web site and I like it very much.

I would like to have a link posted from your site to one of my projects,an insurance web site.

I'm interested in buying advertising space on the index page of your web site,in the form of a simple text link, with a short description.

The link would lead to one of my projects, an insurance site.

I'm interested in a long term advertising relationship.

I'm looking forward to your response detailing the monthly cost of a text link.

Best regards,

[Name removed]

Now, I find this pretty funny - who in their right mind would want to advertise insurance alongside the PHP bugs? :-) [Unless they are selling PHP Bug Insurance].

Furthermore, if I was looking for advertising space, I'd hope that the advertising agency had enough brains to actually find the correctcontact address to arrange the deal...

Adobe Acrobat Reader 6

I happened to reinstall my "desktop" machine with Windows Server 2003 the other day so that I could do some performance tests under IIS 6. I'm also in the process of getting a 2Mbps ADSL line installed, and my ISP emailed a couple of PDF's containing the IP address assignments. I needed to be able to open these things, and I couldn't find the Adobe Acrobat Reader 5.1 installer I downloaded last time around. Adobe are offering 6 right now so I downloaded and installed it.

It looks nice, with some photoshop'd graphic on the splash screen and more winxp-style graphics. It also has an extremely annoying little advertisement on the toolbar that sits there rotating between slides that talk about how good Acrobat is. I wasn't too pleased with this, and after some digging around discovered that there was no way to turn the bloody thing off.

Well, I thought that I could probably put up with it. So, having finished working with the PDF's, I closed the reader and deleted the shortcut icon from the desktop (I don't like crap there, especially now that windows nags you about unused desktop icons). Then I noticed this "PrintMe" internet printing thingy on my start menu. I deleted it, because I don't like crap there either, and certainly don't need to print over the internet.

A few days go by and I need to take another look at those PDF's. When done, I closed the reader, and guess what? The icon is back on the desktop. Hmmmm. Not only that, but that damned PrintMe thing is back again too. Now I'm actually motivated enough to dig around in the reader install dir - I find the PrintMe plugin and move it to a handy empty folder provided by adobe for the purpose of storing plugins you don't want. Nice. Well, guess what? Regardless of whether the plugin is loaded or not, it puts that stupid PrintMe thing back on the start menu. I can't find a way to kill that bloody desktop icon either.

Well, I've decided to live without this version of the reader - it's too damned annoying to use, so I've uninstalled it. I found the 5.1 installer just now, so I think I'll stick with that :-/ Well done Adbobe </sarcastic_clap>

Did you like our Spam?

For a while now, I've been receiving some spam "news" about investment opportunities. A while back I consigned it to my junk mail folder and forgot about it.

I just now received a telephone call from a company in luxembourg asking me if I had received their "investor email newsletter". I told them I had, and that I had been filing it as spam for a long time now.

Unperturbed (perhaps he is deaf?), this guy proceeds to ask me if this is something I am interested in.

Maybe I've just lost the energy to get angry with these people, so I politely said "no, I'm not interested I'm afraid". Luckily for me he said thank you and hung up.

Maybe I should start bouncing spam with "550 No spam, and no telephone calls either" :-)

PHP Cruise

PHP Cruise Yet another conference on the horizon, scheduled for March 2004, the first ever PHP Cruise is a conference taking place on a cruise ship in the Bahamas!

I will be making 3 presentations - Writing Socket Applications in PHP (focusing on new features in PHP 5), E-mail Manipulation and Transmission in PHP - how to do it the "Right Way"™, and finally a more technical talk Extending PHP, which will focus on cooking up a php extension for your favourite library.