Category Archive

Calling SSL secured sites via curl in an Apache chroot

Recently, I’ve had to troubleshoot an issue where we were running an Apache chroot environment and trying to use the Facebook PHP SDK in one of the hosted sites. We consistantly ran into the error message

curl: (77) Problem with the SSL CA cert (path? access rights?)

in our error_log, which threw us a curveball as it wasn’t happening in our local development environment.

After serveral hours of troubleshooting, we used strace to diagnose why this was failing. Using

strace curl -I -v

while chroot’ed in the environment allowed us to see which libraries were failing to load.

We ended up needing to copy the following libaries into the appropriate location within the chroot environment (we’re using CentOS 6, x64 – so your paths may differ). They don’t appear to be linked under our default PHP5 installation.

  • /usr/lib64/
  • /usr/lib64/
  • /usr/lib64/

In addition to these libraries, we copied the following, also into the chroot:

  • /etc/nsswitch.conf
  • /etc/pki/nssdb/
  • /etc/pki/tls/

Hopefully this helps save someone some time and frustration in the future!

No Comments »

Introducing Grapher.js

Last year I started working in the evenings on a simple library built on top of the great work of the Raphael project to do some pie charts and graphs for our helpdesk performance display at Daraco.

While still in a very early stage of development, I feel that it’s reliable enough to release today for public use if you’re wanting something to do basic pie charts and line graphs. Since it’s built on Raphael, Grapher.js generates reasonably good looking cross-browser graphs and charts using SVG.

There are some other options to do this out there, but almost all the good ones are closed source and not free, and others are based on the HTML5 canvas element. I don’t have a particular problem with canvas, but at the time I started working on this project, it seemed like Raphael was a good building block to get what I wanted.


Here’s two screen shots (scaled down from their original size) displaying real data that I’ve grabbed from the implementation of this library at the office.

Grapher - Open Tickets by Status Grapher - Tickets Last 7 Days

Download Grapher.js

Feel free to grab Grapher from (I’d appreciate it if you didn’t blow my bandwidth costs by hot linking to the file!) You’ll also want to make sure you grab Raphael – I’ve built on top of version 2.1.0.

If you want to look at some real samples that I use to test the display of the graphs and to see how it works, check out

Bug Fixes, Patches?

If you’d like to contribute to the library, I’ll gladly accept patches etc. At the present moment I’ve got it licensed under copyright to my name while I work out what open source license to release under. Shoot me an email to james dot kirsop at gmail dot com if you’d like to get in touch!

Where to next?

There’s some work to be done with the current two graph types, mainly around of the key on the left, right (or at all) for pie charts, and labelling the points on the line graph. I’d then like to do some more work on the following:

  • Interactive Graphs – making them responsive to mouse-overs to display additional data
  • Live updating of line charts – so that they don’t need to be completely redrawn when a new graph comes in. Hopefully with some animation transitions as data arrives.
  • More graph types – I’ve only written pie and line graphs because that’s what we needed. I’m hoping to drop in some bar charts soon!
  • Snazziness – no one likes looking at boring graphs!

I’m hoping that this will be useful to some of you, and that I can keep growing this project!


No Comments »

Pace Farm – Biggest Loser Promotion

Recently, Pace Farm approached Fiona and I again, after the work we did on the very successful HOP Promotion last year. This year we were commissioned to do a landing page for a promotion Pace is doing in conjunction with The Biggest Loser Club and Shannan Ponton.

Pace Farm - Biggest Loser Promo Mobile version

The mobile version of the site

We implemented two versions of the site, one for desktop browsers, and also one for modern smart phones, after finding that over 1 in 5 visitors to the HOP website used a mobile device (predominantly Apple’s iPhone) to access the site.

The mobile version was predominantly built using new CSS3 standards which we’ve found are supported across most devices, and both versions of the site used Google Web Fonts to enhance the appearance and user experience. We used CSS3 drawing tools to replace some graphics that would otherwise increase load time over a 3G connection, with great results.

While the competition is still running (until around the end of April) you can check out our work at

No Comments »