LINUX, FOSS AND LIBRARY TECHNOLOGY ENTHUSIAST

Wednesday, October 30, 2019

Koha Plugin : In Out Management System

15 comments


Inout management system is a web-based application. It is used to track the patrons who visit the library or related locations like study zone, reading rooms, etc. It’ll scan the barcode from the ID and log the entry time and exit time of the patrons. The patron data will be fetched from the Koha database along with the images and displayed on this system. There are two interfaces, one is for the reading barcodes at the door and another one is for access to the reports. This system will generate four types of reports in the form of an excel sheet and can be downloaded. There are three users by default for the administration of this system. Master users can have an eye on every location added to the system. And the other two users for respected locations. The system uses the koha database to fetch the information of patrons and store it in another database along with the location, entry time, and exit time. These data can be accessed from the admin panel in various manners like date-wise, time-wise, USN-wise, and many more. 

System Requirements:  

Software: 
  • Apache (Already there in koha server) 
  • PHP 
  • MySQL (Already there in koha server) 
  • Any text editor like vim/mousepad/leafpad/gedit

Hardware: 

A computer system with a widescreen monitor 
Automatic barcode scanner

Installation:

PHP Installation:  for Debian 10 & Ubuntu 20.04 LTS

Open a terminal and enter the following commands.

sudo apt-get install -y git php libapache2-mod-php php-{bcmath,bz2,intl,gd,mbstring,mysql,zip}

cd /usr/share/koha/opac/htdocs

git clone --recursive https://github.com/omkar2403/inout.git

sudo chmod 755 -R inout

sudo chown www-data:www-data -R inout

Setup the database:

Go to MySQL shell and create a database, user, and password for inout  

sudo su
mysql -uroot -p

[Enter MySQL Root password]

CREATE database libinout;
CREATE USER 'libinout'@'localhost' IDENTIFIED BY 'libinout123';
GRANT ALL PRIVILEGES ON *.* TO 'libinout'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
quit;

In the above syntax  'libinout' is the database, ‘libinout’ is the database username and ‘libinout123’ is the database password. Make sure you replace it with your credentials. Now restore the sample database which is present in the ‘inout/DB’ directory. 
 
Run the following command in terminal

sudo su
mysql -uroot -p libinout < /usr/share/koha/opac/htdocs/inout/DB/inout.sql 

[Enter MySQL Root password eg: mysqlroot]   

Replace your database name, database username, and database password in the file dbconn.php located in ‘inout’ directory at line number 3 and change connection details

sudo vim /usr/share/koha/opac/htdocs/inout/functions/dbconn.php


Restart Apache

sudo systemctl reload apache2 && sudo systemctl restart apache2

The system is ready now.

You can access it at the address given below:


NB: If it results with 404 Error Page not Found, Please do the following

Check inout directory

This system should be installed in /usr/share/koha/opac/htdocs/ directory.

Check Port Number

Many libraries change their default port number for OPAC.

Generally, we access inout system by http://127.0.0.1/inout where its port is default 80.

But sometimes you access OPAC with a different port number. Eg: http://127.0.0.1:8001

In this case, if you want to access inout you should follow this http://127.0.0.1:8001/inout

Backing up libinout database

sudo su

mysqldump -ulibinout -plibinout123 libinout | xz > libinout-$(date +%d-%m-%Y-%H.%M).sql.xz

Fix characters Length

Card numbers with more than 11 characters may not work with inout, that can be fixed,

Go to MySQL shell

sudo mysql -uroot -p

USE libinout;
ALTER TABLE 'inout' CHANGE 'cardnumber' 'cardnumber' VARCHAR(50);
FLUSH PRIVILEGES;
quit;

References:

15 comments:

  1. can we do this in Koha version: 18.11.00.000

    Thanks in advance

    ReplyDelete
  2. not working in 19.5 show error
    This page isn’t working127.0.0.1 is currently unable to handle this request.
    HTTP ERROR 500

    ReplyDelete
    Replies
    1. I am also facing similar error. kindly advise.

      Delete
    2. I am also facing a similar issue "http error 500" while logging into account.

      Delete
  3. I have change master password and then forget master password. how to recovery master password?

    ReplyDelete
    Replies
    1. run the command

      sudo koha-passwd library (your instance name), It will show your master password

      Delete
  4. What a thrilling post. It is extremely chock-full of useful information. Thanks for such a great info. inflatable hot tub

    ReplyDelete
  5. Anyways I am here now and could just like to say thank for a tremendous post and a all round entertaining website. Please do keep up the great work. Canada Visa from United States

    ReplyDelete
  6. In out students ID number is 16 digits. I installed the inout management system but I got a error on your ID is too large how can I solve this sir

    ReplyDelete
  7. ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'inout' at line 1

    ReplyDelete
  8. I forgot my login password for in-out management system, (master). how can I get back it.

    ReplyDelete
    Replies
    1. phpmyadmin logged in and reset the master password

      Delete
  9. Thank you. For solving my problem. Is it possible to translate the homepage section? What is the license agreement?

    ReplyDelete