Chapter 8. Compiling YAZ to activate the z39.50 client server

YAZ is a free library of PHP functions published by IndexData in Denmark. This library of functions is necessary to activate the z39.50 import function in PMB (for more details, consult the User's Guide, Cataloguing).

With EasyPHP (therefore on Windows) YAZ is easily accessible and very often you only have to tick into a box in the EasyPHP interface (look for PHP Extensions). On Linux it is not always easy. Here is some advice on how to compile YAZ and activate the z39.50 import function on your machine.

Compiling the PHP/YAZ library on Mandrake Linux 8.2

  1. Install the package rpm php-devel (can be downloaded at fr.rpmfind.net or at mandrake.com)

  2. Download the YAZ source from http://www.indexdata.dk/yaz at http://ftp.indexdata.dk/pub/yaz/yaz-2.0.9.tar.gz

  3. Extract the file yaz-2.0.9.tar.gz

    tar xvzf yaz-2.0.9.tar.gz

  4. Compile yaz : change into the yaz-2.0.9 directory (cd yaz-2.0.9) and enter one after the other the commands :

    ./configure make make install

  5. Change directory to /usr/src/php-devel/extensions/yaz

    cd /usr/src/php-devel/extensions/yaz

    and enter the commands :

    phpize ./configure --with-yaz=/usr/local/bin

    look out for the PHP extensions directory displayed after entering the command ./configure :

    checking for PHP extension directory... /usr/lib/php/xxxxxx or xxxxxx depending on your php version.

    make make install

  6. And then copy the file /usr/lib/php/xxxxxx/yaz.so into the PHP extensions directory : /usr/lib/php/extensions (cp /usr/lib/php/xxxxxx/yaz.so /usr/lib/php/extensions) and add the line extension = yaz.so in the file /etc/php.ini.