Unified Diff

PHP

FUSE Extension for PHP

by Bob on 15 December 2008, under FUSE, Linux, OS X, Open Source, PHP, Projects

Well, it’s official… I’m a geek. A few weeks ago I started writing an extension for the PHP runtime that provides bindings to libfuse. Back up a few months— I wrote a PHP script to screen-scrape the Trac web interface and allow me to grab source code to a project I’m working on.

My solution worked but it was pretty ugly. So I wondered if it would be better to implement a FUSE file system to do the same task. Unfortunately PHP didn’t have bindings for libfuse at the time. After several failed attempts at using SWIG to automagically generate an extension, I came to the harsh realization that if I wanted FUSE bindings I’d have to do it myself. I mean… how hard could it be?

It actually wasn’t too bad. I read a bunch of non-existent documentation on the Zend API and went to work on a prototype. It took me about a week, but I now have a working PHP extension. I’ve also since implemented TracFS to replace my ugly script.

(continue reading…)
more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!