[Yazlist] PHP-YAZ testing

Lawrence Olliffe lolliffe at getty.edu
Tue Apr 8 19:28:02 UTC 2014


Hello,


I'm new to YAZ, and I haven't been able to find a simple script that just shows me if YAZ is even properly installed and making a connection.


Does anyone know of a simple "It works" PHP script, where it just shows that you're able to make a basic connection.  


I found one sample:
<Xphp
$query = "@attr 1=7 9780230008496";
$host="my.server.com/volume";  // my info is inserted in the real script
$data = yaz_connect($host);
yaz_syntax($data, "usmarc");
yaz_range($data, 1, 5);
yaz_search($data, "rpn", $query);
yaz_wait();
$rec = yaz_record($data, 1, "string");
echo "<pre>$rec</pre>";
?>


But when I run it, I get an error.  It seems to be properly installed  "extension=yaz.so" is in my php.ini, etc.


-bash-3.2$ php yaz2.php 
PHP Fatal error:  Call to undefined function yaz_connect() in yaz2.php on line 4



Any help would be appreciated,
LO

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.indexdata.dk/pipermail/yazlist/attachments/20140408/2b679224/attachment.html>


More information about the Yazlist mailing list