#define ONE 2

Adam Hinz: The Blog

Again with the plt

On 2008-09-07 at 9/07/2008 12:58:00 AM...

Jens Lekman - Black Cab

I'm back with this PLT Scheme web server. I had a few hiccups, which are now somewhat ironed out.

First, I found out that I was actually using an old version. PLT is up to 4.1, but Ubuntu's repository is still at 3.5 something. I've got 64 bit Ubuntu, and I ended up download the version here: http://download.plt-scheme.org/drscheme/plt-4-1-bin-x86_64-linux-f7-sh.html.

The 32-bit installed fine, but it wouldn't cooperate with the mysql shared library files.

Mysql. Ugh.

Lucky for me, someone already wrote wrappers for interacting with it. I got them here: http://software.pupeno.com/mr-mysql. It needs to load libmysqlclient.so, which exists on my machine as libmysqlclient.so.15.0.0 (not sure why), but a symbolic link fixed that.

Next problem was actually spitting out the content from the database. Getting the data was easy enough with the mysql library, but the web server insisted on escape my html. That is, every > was turned into an >, etc. Kind of annoying. Finally, I found this page that offered a solution: http://www.cs.brown.edu/pipermail/plt-scheme/2006-March/012349.html. Throw in a (require xml) at the top of your module and wrap your data with (make-cdata data) and you're all set.

1 comments

Other places where I exist


Archive