Penggunaan fungsi YAZ pada PHP

PHP/YAZ is an extension to the popular web server language PHP that implements Z39.50 origin (client) functionality as well as the SRW/SRU protocols.

The following Z39.50 services are supported by this extension: init, search, present, scan and sort. The extension can handle GRS-1, MARC, SUTRS and XML. The module also allows you to convert MARC in ISO2709 to MARCXML on the client side.

The PHP/YAZ extension is part of PHP 4.0.1 and later but has now been moved to PECL. As a PECL module, PHP/YAZ is now independent of PHP versions. It works with both PHP 5 and PHP 7.

New! You can use Index Data’s hosted MasterKey Connect service to easily integrate remote resources that are not directly accessible by Z39.50 or SRU. Simply let us know which resources are of interest to you, and we will set up hosted connectors for you with a SRU/Z39.50 interface. We support most possible access methods, including native APIs, OAI-PMH harvesting, and screenscraping. Now you no longer have to rely on your data providers to support sensible interfaces: MasterKey Connect is the ultimate glue layer for your application.

Visit the PHP/YAZ package page at PECL.

According to its website, “YAZ is a programmers’ toolkit supporting the development of Z39.50/SRW/SRU clients and servers.” CLIENT and server. And yes, this article is a way to share about how to activate YAZ library as a client service to run in Laragon as web server to make app like Senayan Library Management Service (SLiMS) using it for copy cataloging feature.

Using Laragon, the PHP installation directory would be situated in:

E:\laragon\bin\php

Above is my Laragon installation directory. Yours could be different. In Laragon, within the PHP directory, depends on how many PHP versions you’ve installed, you will find directories that might look like this:

Penggunaan fungsi YAZ pada PHP

Now we have understand where the location of PHP directory installation is, next we can start download needed YAZ files/components by accessing this website, https://ftp.indexdata.com/pub/phpyaz/windows/. Choose the PHP version that being used in Laragon. Don’t forget to pay attention on which architecture you use for Laragon. Mostly are using the 64 bit version. But if your machine using a 32 bit architecture, use the correspondence version.

The files are:

libxml2.dll
libxslt.dll	 
php_yaz.dll	 
yaz5.dll

Copy file libxml2.dll, libxslt.dll, yaz5.dll to the main directory of PHP installation. And copy the file php_yaz.dll to the ext directory within the PHP installation. After finished copy all files, start editing php.ini file and add this line under the Dynamic Extensions line.

extension=yaz

It will look like this:

Penggunaan fungsi YAZ pada PHP

Save the change been made and reload your Apache’s Laragon service. And now, YAZ service detected as active in SLiMS Installer 😉 Enjoy!

Penggunaan fungsi YAZ pada PHP

It was happening to me, recently. Previously, am using Windows 10. Then got the upgrade to Windows 11. Upgrade process went smooth. Apps installed seem to work fine. I am using VirtualBox to run OSes for lab or just to test on some Linux OS new release.

In Windows 10, running the Guest OS in VirtualBox was not a matter. Then after using Windows 11, I got bumped with this, “Failed to open a session for the virtual machine”, it said. Well, I was actually expecting this, but not this soon 😁

What happened with the problem was, the Hyper-V was not completely off, after you upgrade to Windows 11. That what most of the articles wrote. And to handle the problem, you need to execute this with the terminal with administrator privilege.

bcdedit /set hypervisorlaunchtype off

After that, shut down your computer and unplug the power cord for approximately 20 seconds. Plug it in, then start your machine. Now try to open the Guest OS with VirtualBox. In my case, I still need to run this one command:

DISM /Online /Disable-Feature:Microsoft-Hyper-V

Again, turn off your computer, unplug the cord. Wait for 20 seconds. Plug it back. Turn on your machine. Run the Guest OS. And everything went on normal again.

Reference:
https://forums.virtualbox.org/viewtopic.php?f=25&t=99390

PSchILS sudah lama tidak mendapatkan pembaruan. PSchILS merupakan salah satu bentuk ringkas dari SchILS seperti halnya PSLiMS. SchILS dalam bentuk portabel, yang tinggal diekstrak dan jalankan. Kode sumber SchILS dapat diunduh di https://gitlab.com/wynerst/schils. Pembaruan terakhir dari SchILS adalah perbaikan fungsi pencadangan pangkalan data pada sub-menu Database Backup dalam modul System. Saat ini, SchILS masih menggunakan kode sumber SLiMS 7 Cendana sebagai dasar pengembangannya.

PSchILS yang dapat diunduh pada laman https://psbsekolah.kemdikbud.go.id/schils/app/ menggunakan porta 80 untuk layanan Apache serta porta 3606 untuk layanan mysql. Permasalahan yang terjadi pada paket PSchILS yang diunduh pada laman tersebut di atas, kode sumber SchILS yang dipaketkan masih mengandung masalah, terutama pada bagian pencadangan pangkalan data lewat antarmuka admin SchILS.

Permasalah yang ingin dibahas pada tulisan ini adalah, tentang bagaimana melakukan pencadangan pangkalan data dengan kondisi pencadangan pangkalan data lewat antarmuka admin SchILS mengalami galat.

PSchILS dilengkapi dengan aplikasi Adminer yang digunakan untuk mengakses pangkalan data MySQL. Untuk mengakses aplikasi tersebut, arahkan ke tautan localhost/adm.php.

Penggunaan fungsi YAZ pada PHP

Apabila kita mengakses laman tersebut, hanya dengan memasukkan kredensial username dan password yang digunakan dalam konfigurasi pangkalan data, maka kita akan menemukan pesan galat sebagai berikut:

Penggunaan fungsi YAZ pada PHP

Untuk menanggulangi permasalahan tersebut, solusinya adalah dengan memasukkan alamat beserta porta yang digunakan oleh MySQL pada ruas isian “Server“. Seperti yang sudah disebutkan sebelumnya, secara baku, PSchILS menggunakan porta 3606. Jadi isian ruasnya ditulis seperti ini:

localhost:3606

Penggunaan fungsi YAZ pada PHP
Note:
Contoh pada gambar di atas, porta MySQL PSchILS-nya sudah diubah untuk menggunakan porta 3306.

Klik Login atau tekan tombol Enter untuk masuk. Dan lihatlah, kemudian pangkalan data tersebut disajikan.

Penggunaan fungsi YAZ pada PHP

Silahkan lakukan pencadangan pangkalan data, seperti yang Anda pahami dengan cara yang biasanya (Export). Lalu … semoga bermanfaat :).