Gate Register



Install PHP
apt-get update
apt-get upgrade
sudo apt-get install php5 libapache2-mod-php5 php5-mysql php5-memcache

Download following two files from here and put in your home folder.
entry.php and entrylog.sql

You can open entry.php file and identify the lines critical information stored. Enable line numbers in Editor tool.

Goto Line numbers 15&16. Where Koha database username and password entered.
You can enter your Koha database user name and password.  Line 29 contains name of Koha databse. 


Create data base for gate register
Open a terminal and apply following commands,

sudo su
mysql -uroot -p
[Enter MySQL Root password]

create database entrylog;
grant all privileges on entrylog.* to 'gate'@'localhost' identified by 'gate123';
flush privileges;
quit;


Move entry.php to Koha OPAC server folder

sudo su
sudo mv /home/koha/entry.php /usr/share/koha/opac/htdocs
cd /usr/share/koha/opac/htdocs 
chmod +x entry.php

Restore sample database
sudo su
mysql -uroot -p entrylog < entrylog.sql

Open Gate register
http://127.0.1.1/entry.php


Post a Comment

23 Comments

  1. where I can see the report of gate register ?

    ReplyDelete
  2. 0) {
    while ($row = mysql_fetch_assoc($result)) {
    $csv_output .= $row['Field'].", ";
    $i++;
    }
    }
    $csv_output .= "\n";

    $values = mysql_query("SELECT * FROM ".$table."");
    while ($rowr = mysql_fetch_row($values)) {
    for ($j=0;$j<$i;$j++) {
    $csv_output .= $rowr[$j].", ";
    }
    $csv_output .= "\n";
    }

    $filename = $file."_".date("Y-m-d_H-i",time());
    header("Content-type: application/vnd.ms-excel");
    header("Content-disposition: csv" . date("Y-m-d") . ".csv");
    header("Content-disposition: filename=".$filename.".csv");
    print $csv_output;
    exit;
    ?>

    ReplyDelete
  3. copy and past note pad, change rename report.php,
    put the koha location.
    use/share/koha/opac/htdocs
    t open the browser http://127.0.1.1/report.php

    ReplyDelete
  4. i tried but shows 0) { while ($row = mysql_fetch_assoc($result)) { $csv_output .= $row['Field'].", "; $i++; } } $csv_output .= "\n"; $values = mysql_query("SELECT * FROM ".$table.""); while ($rowr = mysql_fetch_row($values)) { for ($j=0;$j<$i;$j++) { $csv_output .= $rowr[$j].", "; } $csv_output .= "\n"; } $filename = $file."_".date("Y-m-d_H-i",time()); header("Content-type: application/vnd.ms-excel"); header("Content-disposition: csv" . date("Y-m-d") . ".csv"); header("Content-disposition: filename=".$filename.".csv"); print $csv_output; exit; ?>

    ReplyDelete
  5. Hello,
    I followed as per your instruction. But I am getting following error when I run entry.php. Can you please guide me to fix the problem?

    Not Found

    The requested URL /entry.php was not found on this server.
    Apache/2.4.7 (Ubuntu) Server at 127.0.1.1 Port 80

    ReplyDelete
    Replies
    1. I just changed port number. It works great.
      Thank you so much. God bless you.

      Delete
    2. When I tried for report, I got the error like this. Please help me to fix the problem. Thank you.

      { while ($row = mysql_fetch_assoc($result)) { $csv_output .= $row['Field'].", "; $i++; } } $csv_output .= "\n"; $values = mysql_query("SELECT * FROM ".$table.""); while ($rowr = mysql_fetch_row($values)) { for ($j=0;$j<$i;$j++) { $csv_output .= $rowr[$j].", "; } $csv_output .= "\n"; } $filename = $file."_".date("Y-m-d_H-i",time()); header("Content-type: application/vnd.ms-excel"); header("Content-disposition: csv" . date("Y-m-d") . ".csv"); header("Content-disposition: filename=".$filename.".csv"); print $csv_output; exit; ?>

      Delete
    3. Hello
      Did you get the solution for this?

      Delete
    4. how to change port in gate register

      Delete
  6. Kindly help to add exit time of users along with entry time

    ReplyDelete
  7. i have run the above code as per the instruction but didn't work.can anyone help me to fix the problem.

    ReplyDelete
  8. I followed all the instructions and i can see the gate entry home page.when i open the report page its shows the following error:

    Sorry, the requested page is not available
    Error 404
    This message can have the following reason(s):

    You made use of an external link to a catalog item that is no longer available.
    You followed an outdated link e.g. from a search engine or a bookmark.
    You tried to access a page that needs authentication.
    An internal link in our catalog home page is broken and the page does not exist.

    Could you please help me to get the solution for this?. it would be grateful

    ReplyDelete
  9. After this command
    sudo mv /home/koha/entry.php /usr/share/koha/opac/htdocs
    the following is shown in the terminal
    mv: cannot stat ‘/home/koha/entry.php’: No such file or directory
    what should I do?
    may i start the command from the beginning?
    Please help me.

    ReplyDelete
  10. How to change port kindly help me

    ReplyDelete
  11. is there any deference between Php and PHPmyadmin

    ReplyDelete
  12. it is showing unable to connect

    what to do

    ReplyDelete
  13. when i ran bellow command

    sudo apt-get install php5 libapache2-mod-php5 php5-mysql php5-memcache

    Error is showing like this

    E: Package 'php5' has no installation candidate
    E: Package 'libapache2-mod-php5' has no installation candidate
    E: Package 'php5-mysql' has no installation candidate
    E: Unable to locate package php5-memcache

    ReplyDelete
  14. everything is ok, but when I open 127.0.1.1/entry.php it shows 'unable to connect'.
    Please help

    ReplyDelete
  15. Sir,
    I DONE ALL PROCESS. THE HOME SCREEN ALSO APPEARED. BUT WHEN I ENTERED STUDENT ROLLNUMBER.
    IT IS SHOWN AS
    Could not connect: Acess denies for user 'meslibrary'@'localhost' (using password: YES)

    ReplyDelete
  16. Mock Test Master Master Provides Free Online Mock Test Series and Practice Sets for NEET, GATE, CAT, NDA, IBPS, SBI, UPSC, SSC, IIT-JEE, CSIR-NET, CTET, etc.
    Free Online MCQ Test Chemistry Class 12th Chapter wise with Answers
    NEET Previous Year Question Paper Online Mock Test Free

    ReplyDelete