cobisja / tad-php

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

get_all_user_info() Does not work #4

Closed 3mralaa closed 9 years ago

3mralaa commented 9 years ago

get_all_user_info() , get_att_log() Does not work but work with https://github.com/dnaextrim/php_zklib why ??

3mralaa commented 9 years ago

Fatal error: Uncaught exception 'TADPHP\Exceptions\ConnectionError' with message 'Imposible iniciar conexión con dispositivo -------' in C:\Ampps\www\tad\tad\lib\TAD.php:408 Stack trace:

0 C:\Ampps\www\tad\tad\lib\TAD.php(271): TADPHP\TAD->check_for_connection()

1 C:\Ampps\www\tad\index.php(23): TADPHP\TAD->__call('get_all_user_in...', Array)

2 C:\Ampps\www\tad\index.php(23): TADPHP\TAD->get_all_user_info()

3 {main}

thrown in C:\Ampps\www\tad\tad\lib\TAD.php on line 408

cobisja commented 9 years ago

Hi,

The reason: your device does not have SOAP support ant the functions "get_all_user_info()", and "get_att_logs()" both depend on SOAP.

I am working in a new version where you can specify what provider, SOAP, UDP or BOTH, are going to use to interact with the device.

My apologizes,

Cobis

El viernes, 22 de mayo de 2015, Amr Alaa notifications@github.com escribió:

get_all_user_info() , get_att_log() Does not work but work with https://github.com/dnaextrim/php_zklib why ??

— Reply to this email directly or view it on GitHub https://github.com/cobisja/tad-php/issues/4.

MrAwanishKumar commented 7 years ago

Hi,

I'm also getting the error while accessing any information like $tad->get_date()

`TADPHP\Exceptions\ConnectionError

Imposible iniciar conexión con dispositivo 192.168.1.7

  1. in /home/awanish_k/http/demo/frontend/web/tad-php/lib/TAD.php at line 408 399400401402403404405406407408409410411412413414415416417 /* * Throws an Exception when device is not alive. * @return boolean true if there is a connection with the device. * @throws ConnectionError */ private function check_for_connection() { if (!$this->is_alive()) { throw new ConnectionError('Imposible iniciar conexión con dispositivo ' . $this->get_ip()); } return true; }`

Any idea how to solve this.

Thanks

cobisja commented 7 years ago

Hi my friend,

You have to be sure that your device has an integrated web server, because although TAD-PHP offers an unique interface for sendind commands, internally it uses 2 kind of connections: SOAP and UDP, and of course SOAP commands relies on the web server.

I would like to improve TAD-PHP to change this behavior but unfortunately I don't have a device to make the modifications and test them in a proper way.

Best regards,

Cobis

2016-10-20 7:57 GMT-04:00 Awanish Kumar notifications@github.com:

Hi,

I'm also getting the error while accessing any information like $tad->get_date()

`TADPHP\Exceptions\ConnectionError

Imposible iniciar conexión con dispositivo 192.168.1.7

  1. in /home/awanish_k/http/demo/frontend/web/tad-php/lib/TAD.php at line 408 399400401402403404405406407408409410411412413414415416417 /**
    • Throws an Exception when device is not alive.
    • @return https://github.com/return boolean true if there is a connection with the device.
    • @throws https://github.com/throws ConnectionError */ private function check_for_connection() { if (!$this->is_alive()) { throw new ConnectionError('Imposible iniciar conexión con dispositivo ' . $this->get_ip()); } return true; }`

Any idea how to solve this.

Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cobisja/tad-php/issues/4#issuecomment-255085554, or mute the thread https://github.com/notifications/unsubscribe-auth/AJzLMjN9xIvv1y4qcdXmOKTaNc_lJbs1ks5q11csgaJpZM4Ek20p .

MrAwanishKumar commented 7 years ago

Hi,

Thank you for your valuable reply.

I can access the device from windows application (software CD came with the device), it also uses the LAN to connect, that means device has enabled the web interface (let me know if I am wrong).

If you can assist me to solve the issue, is great help for me.

Thanks Awanish Kumar