vodvud / php_zklib

GNU General Public License v2.0
23 stars 19 forks source link

System setup on hosting #29

Open seangkimpheng opened 4 years ago

seangkimpheng commented 4 years ago

I was testing in local, it is woking fine and also can get data but when move project to cloud ( In hosting) it not work. anyone have any solutions?

vodvud commented 4 years ago

Hello! If your device have Public IP address (IPv4) or Global IPv6 than you can connect directly. But if your device in local network under NAT you may confiture port forwarding to local IP address (see #24)

seangkimpheng commented 4 years ago

Thank you for your reply, one more question If I don't have the router for configuration , so can it work ?

vodvud commented 4 years ago

By the network policy possible to connect to any device in local network if have one of below:

seangkimpheng commented 4 years ago

my local IP = 192.168.8.1 (If I use in local (Setup IP 192.168.8.201 in finger print), Port 4370 it woking well for local system) photo_2020-06-06_10-27-32 But my system move to online now,

Example: I have hosting PUBLIC IPV4 ADDRESS = 178.128.24.123 PUBLIC GATEWAY = 178.128.25.1 SUBNET MASK = 255.255.234.0 Port = 9876

So I try to connect directly from PUBLIC IPV4 to figure print(Setup public IP in finger print), but still not working. (see below picture). have any wrong from us ?, Kindly let me know photo_2020-06-06_11-15-17

vodvud commented 4 years ago

Hello.

huytq397901 commented 5 months ago

Hello.

  • You should set your custom port number $zk = new ZKLib('178.128.24.123', 9876);
  • Check if allowed UDP connection to your public IP
  • Check connection quality between your application and fingerprint machine.

I tested it ok on xamp Windows, but on the linux apache2 server it's the same PHP code file but it doesn't work (only get data User, can not get attendance). Can you explain or give any special configuration instructions on apache2? Tks