Wednesday, 27 February 2008

Fixing Mac OS X Leopards abysmal PHP implementation

One of the unsung updates that occurred on OSX Leopard, was the introduction of Apache2 and PHP 5.2.4 as standard components for web page sharing. When you enable "Web sharing" on the Mac, you are essentially starting up a copy of the Apache workhorse on your system, enabled by OSX's unix underpinnings.

However in true Apple form, they seem to have gone out of their way to make life hard, and the default startup mode for the builtin apache system is as a 64bit application (on intel C2D+ hardware), making it difficult to use the provided PHP implementation "as is", if you need to load any extensions.

The issue stems from the choice of built in support on the Apple delivered php implementation. There are many deficiencies in the manifest of included options, of note is the lack of support for the PHP GD or GD2 module, used in many applications that required graphical output, PDFlib, libtidy and PEAR support are also highlighted by their absence.

Ok, no problem, down load the source for PHP 5.2.4. compile the extensions, and install them i hear you say....

Problem, on most recent Macs, the PHP implementation is also 64bit, a configuration that is not supported out of the box in the standard build options on PHP, and if that was not enough, many of the extensions you might want to install, are dependent on external libraries, not supplied by apple, and whose build environments also do not support creating the 4 way universal libs required to play nice across all the platforms Leopard runs on. Package managers such as fink or macports, hav'nt caught up with the need to supply 4 way fat binaries to cover all the possible platform variations.

Ok, no problem, I found this excellent tutorial on adding GD lib, , however try as i might, i could not get this to load, probaly again due to 64bit/32bit unhappyness. My foo is not enough........ :-( But it may work for you, and if GD is the only extension you need, then bobs your uncle.

Fortunately for those of use with more challenging PHP enviroment requirements Marc Liyange of fame has taken up the challenge and is producing a version of PHP 5.2.5 loaded for bear, which solves all of these build intricacies. Currently in beta 6, its works well on both my C2D macs and my G4 Macs.

However one word of caution, marc's installation process assumes that you have not yet enabled the on-board php implementation, if you have then you need to comment out the LoadExtension line you carefully uncommented to enable it, and trust to marc's magic installation of additional included conf files.

Oh, and another notable is that php.ini moves from /etc to /usr/local/php5/etc

More details of beta 6 can be found on this thread.

LMS, CMS time for a merger?

Recently i have been playing around with LMS (Learning Management Systems), this is a way cool technology, and a whole ecosystem has grown up around authoring, editing and presenting courseware. 

My main interest is in providing LMS capabilities inside an existing Portal application, hence i have been looking at how to integrate an LMS system and a conventional Portal/CMS system. 

Having come from the publishing industry, i'm quite comfortable with the conventional view of publishing, articles, listings and other media. But my foray into the LMS side of things has shown me that there is a whole wealth of other content types that are not the traditional "flat" content. Working with an LMS and the courseware authoring systems, has opened my eyes to the fact that content should be capable of being active. 

I think the reason why we don't see more interactive content is there is a lack of embeddable "runtime" components for interactive content. Sure we have flash etc, but they are more production tools, and don't provide the standards and rich ecosystem  required for interactive content exchange. Flash essentially locks the content down to a singular presentation format, and does not offer the interchange capabilities that would allow the same interactive content to be rendered adaptively.  Flash is essentially similar in concept to PDF which again locks down the interaction and presentation models. 

In the LMS world there are a number of emerging standards for "packaging" courseware, one of which is SCORMS. Most OSS and commercial systems now support it as an interchange format for interactive learning material, its rapidly becoming the ".doc" format of learning content. 

I'll be writing more as i explore this space in the coming weeks, so stay tuned..... 

Tuesday, 12 February 2008

Friends do interesting things

Some friends of mine have just completed the first phase of a site to allow graduates to find jobs with industry leading companies. Anyway you can judge the results for yourself, and if you are looking for a new role, sign up even. 

Details at