PHP and Oracle and VuFind

      1 Comment on PHP and Oracle and VuFind

Work continues on the VuFind alternative OPAC. I’m finally making some progress on the part that’s been so frustrating—setting up a real-time link between our VuFind catalog and our Voyager system.

VuFind builds its database using MARC records that are extracted from Voyager (click here for the scripts I use to dump the records), converted to XML (thank you Yaz), then indexed by Solr. It then relies on a real-time link back to Voyager to get the shelf-location and circulation information that isn’t stored in the MARC record.

It’s been two steps forward, one step back but I’m getting used to it.

My first step forward was deciding to put the testbed on a faster, more capable server (moving from a 1.8Ghz Shuttle barebones to a newer one—one with a Core2Duo chip and more memory). Of course, it’s never that easy. Step back: The XPC model I picked out (SD32G2) couldn’t boot Linux on dual-core CPUs. Forward? Finding a bootable DOS diskette and updating the BIOS (why do so many BIOS update utilities assume you’ve installed Windows?).

Following my usual “fix it till it breaks” path, I decided to go with a different Linux distribution. Tried SuSE 10.2 (since we already have several of those boxes running) but absolutely could not get the Oracle PDO_OCI module installed for PHP. Next, Ubuntu 7.04 (server, 64-bit) but very, very late in the configuration process I discovered that Oracle’s software was 32 bit (Doh!). Adding the libaio module to compensate for the 64->32 bit change, broke PHP. Segmentation faults.

Ended up installing Ubuntu Server 6.06 LTS (the same distribution that I had first used for VuFind). Plus ça change, plus c’est la même chose.

Now on a roll, I managed to install all the necessary software and even had success getting the PDO_OCI module installed for PHP. For reasons I can’t explain, I still could not get VuFind to “talk” to Voyager.

Earlier, I had found that I could connect to Voyager from this Ubuntu box if I used the OCI8 interface. In frustration, I decided to just recode the VuFind->Voyager link substituting the OCI8 connector for the PDO_OCI module. Read a fair amount of Oracle’s “Underground PHP and Oracle Manual” (click here for the 3.3Mb pdf) and several tutorials on coding PHP classes (a part of PHP I’ve never explored). I installed Oracle 10g Express Edition (decided it was perhaps easier than just using the instantclient software) and manually added ORACLE_HOME=“/usr/lib/oracle/xe/app/oracle/product/10.2.0/server” to my /etc/environment file (turns out, that’s very important to subsequent compilation of the OCI8 module).

It worked.

sams_vufind.jpg

So, our VuFind testbed now offers a real-time display of location and circulation status information–but only in the initial list of matches (for reasons I’m still investigating, it doesn’t work when trying to display “holdings” information for an individual record). Work continues…

http://zoombox.gmu.edu/vufind