cobisja / tad-php

PHP Library for ZK Time & Attendance Devices
MIT License
213 stars 159 forks source link

Warning: unpack(): Type H: not enough input, need 1, have 0 #22

Open akasham67 opened 7 years ago

akasham67 commented 7 years ago

Hi,

Thank you for this repo.

I face a problem when I am trying to implement your repo. When I run this command it show me following error: Code: $b1->execute_command_via_zklib('get_device_name') Error: Warning: unpack(): Type H: not enough input, need 1, have 0

lib/Providers/TADZKLib.php on line 425, on line 437, 549, 351, 549

Thank you.

hmisahaq commented 5 years ago

same issue error: Code: $b1->execute_command_via_zklib('get_device_name') Error: Warning: unpack(): Type H: not enough input, need 1, have 0 TADZKLib.php on line 425, on line 437, 549, 351, 549

batang-it commented 5 years ago

Any solution on this problem? Same issue here.

exception: "ErrorException" file: ".../tad-php/lib/Providers/TADZKLib.php" line: 425 message: "unpack(): Type H: not enough input, need 1, have 0"

ahmeraq commented 3 years ago

Any Solution?

bushmusi commented 3 years ago

Solved I have faced same problem steps I did before starting fetching data

  1. $zk = new ZKTeco('device ip', 'device port');
  2. $zk->connect();
  3. $zk->enableDevice()
  4. $zk->getUser()

NB: if not working just refresh the page

ShuvroHosain commented 2 years ago

This issue occurred for the PHP version. on 5.6 it works fine but in PHP 7 each and unpack is not working correctly.

muradbdinfo commented 2 years ago

This issue occurred for the PHP version. on 5.6 it works fine but in PHP 7 each and unpack is not working correctly.

what can we do now.

bryanjamesdelaluya commented 2 years ago

I am using PHP 7.4 and resolved this by restarting my ZKTeco hardware.

akatech100 commented 1 year ago

anyone can fix this 65db3c95-f1e1-4ad2-a26e-7c97363d6e6c

i use zklib library but when i try to entry data for second entry, data was wrong, please help me master. thankyou.

i using device of faceid solution x901 @ShuvroHosain @bryanjamesdelaluya @bushmusi or anyone can help me

bushmusi commented 1 year ago

I have been trying to use ZKLIB. But it wasn't consistent and efficient when I was trying(it may be my fault) then I switched to Python and start using pyzk and you can find docs here @akatech100

akatech100 commented 1 year ago

I have been trying to use ZKLIB. But it wasn't consistent and efficient when I was trying(it may be my fault) then I switched to Python and start using pyzk and you can find docs here @akatech100

I have been trying to use ZKLIB. But it wasn't consistent and efficient when I was trying(it may be my fault) then I switched to Python and start using pyzk and you can find docs here @akatech100

thankyou bro @bushmusi for your response but btw i have already success use zklibrary for php using first data entry, i send frist data entry to database and then i clear log on device with script and so on.,,,,,, the problem is in second entry but first entry is correctyl. thnks bro

jhayz023 commented 1 year ago

can anyone send me a file about viewing zkteco biometic fi;e using php thank you

jhayz023 commented 1 year ago

anyone can fix this 65db3c95-f1e1-4ad2-a26e-7c97363d6e6c

i use zklib library but when i try to entry data for second entry, data was wrong, please help me master. thankyou.

i using device of faceid solution x901 @ShuvroHosain @bryanjamesdelaluya @bushmusi or anyone can help me

can you send me your php file thank you bro

fabricioeche commented 1 year ago

Can you send me too, please?

HectorNery commented 1 year ago

anyone can fix this 65db3c95-f1e1-4ad2-a26e-7c97363d6e6c

i use zklib library but when i try to entry data for second entry, data was wrong, please help me master. thankyou.

i using device of faceid solution x901 @ShuvroHosain @bryanjamesdelaluya @bushmusi or anyone can help me

Hi, I am developing a similar system using php, could you share your project with me, to start with something functional?

cpasqualini commented 1 year ago

Hi,

Thank you for this repo.

I face a problem when I am trying to implement your repo. When I run this command it show me following error: Code: $b1->execute_command_via_zklib('get_device_name') Error: Warning: unpack(): Type H: not enough input, need 1, have 0

lib/Providers/TADZKLib.php on line 425, on line 437, 549, 351, 549

Thank you.

In my case was a blocked port UDP/4370 ... had access to TCP/80 (HTTP) but some firewall denied the UDP connection, once enabled the issue gone

Best regards

Sharifur commented 1 year ago

Tried all of the available solutions in this discussion but still same issue. image