Archive for the 'AOL Server' Category

aolserver4-nsmysql

Nice! Finally got AOL Server’s nsmysql driver working with a lot of help from Dossy. (THANKS!)

This was the trick:

make NO_ROPT=1 NEED_ZLIB=1 NO_LDOVERRIDE=1

As well as having libmysqlclient14 and libmysqlclient14-dev. I’m running Lenny, so I had to grab those from Sarge. Thankfully they installed without a problem.

I haven’t actually tried it yet, but I wanted to post the solution before I got distracted with other things. How do I know its working? The logs:


[14/Jul/2008:12:56:46][4967.3083085488][-main-] Notice: modload: loading '/usr/lib/aolserver4/bin/nsmysql.so'
[14/Jul/2008:12:56:46][4967.3083085488][-main-] Notice: Ns_MySQL_DriverInit(mysql):  Loaded Panoptic MySQL Driver v0.6, built on Jul 14 2008 at 12:56:36.

So the fact that aolserver4-nsmysql is included in lenny, but libnsmysql14 is not, is a problem. I haven’t heard back from Riccardo yet, so I’ll hold off on contact him again until I do.

UPDATE: I’ve successfully queried a MySQL database and returned values to a TCL script, and output to a web page. It works. :-)

aolserver4-nsxml

Debian (which is awesome) has the aolserver4-nsxml package, but it doesn’t come with xslt support compiled in. So I’ve downloaded the source and am trying to build it with xslt support. In the Makefile:

ifdef LIBXSLT
    MODLIBS   = -L/usr/lib -L/usr/lib -lxml2 -lxslt
    CFLAGS   += -DDO_XSLT -I$(LIBXML2)/include/libxml2 -I$(LIBXSLT)/include
else
    MODLIBS   = -L/usr/lib -lxml2
    CFLAGS   += -I/usr/include/libxml2
endif

Hmmm, not sure how to work with that, maybe I’ll just set LIBXSLT to the path where its located?

I set LIBXSLT = /usr, and that seems to make it try to compile in xsl support, but I get these compilation errors:

nsxml.c:2240: warning: implicit declaration of function ‘xmlMemSetup’
nsxml.c:2240: error: ‘xmlFreeFunc’ undeclared (first use in this function)
nsxml.c:2240: error: expected ‘)’ before ‘ns_free’
nsxml.c:2245: warning: implicit declaration of function ‘xmlInitMemory’
nsxml.c:2247: warning: implicit declaration of function ‘xmlSetExternalEntityLoader’
nsxml.c:2247: error: ‘xml_load_entity’ undeclared (first use in this function)
nsxml.c:2249: warning: implicit declaration of function ‘xmlInitParser’
nsxml.c:2251: warning: implicit declaration of function ‘xmlSubstituteEntitiesDefault’
nsxml.c:2252: error: too many arguments to function ‘xsltSetGenericErrorFunc’
make: *** [nsxml.o] Error 1

Sweet! I somehow got it to work just by trying a few different attempts! Here’s what worked:

#
# $Header: /cvsroot/aolserver/nsxml/Makefile,v 1.3 2002/06/01 17:30:24 scottg Exp $
#
# nsxml --
#
#      Implements XML parser
#
 
ifdef INST
    NSHOME ?= $(INST)
else
    NSHOME ?= /usr/lib/aolserver4
endif
 
LIBXML2   =  /usr
LIBXSLT   =  /usr
MOD       =  nsxml.so
OBJS      =  nsxml.o
HDRS      =
 
ifdef LIBXSLT
    MODLIBS   = -L/usr/lib -lxml2 -lxslt
    CFLAGS   += -DDO_XSLT -I/usr/include/libxml2 -I/usr/include
else
    MODLIBS   = -L/usr/lib -lxml2
    CFLAGS   += -I/usr/include/libxml2
endif
 
include  $(NSHOME)/Makefile.module
 
install:
    mv *.so debian/nsxml/usr/lib/aolserver4/bin/
.PHONY: install

This is very very cool! :-)

TODO: Add support for parsing XSLT files - this is an absolute must as most xsl templates use imports and includes these days.