cobisja / tad-php

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

Fatal Error Upon Start #56

Open aice09 opened 6 years ago

aice09 commented 6 years ago

I try to use the following projects (https://github.com/dnaextrim/php_zklib, https://github.com/kamshory/ZKLibrary) that relate to ZKTeco and I use some cool stuffs like getting attendance, users, and system info. But I am looking for some advance stuffs like enrolling fingerprint, so I try to use these project but when I start I got already an error so I cannot advanced.

I am using ZKTeco TX628.

I follow the instruction at README.md. And use the following codes:

<?php
require 'lib/TADFactory.php';
require 'lib/TAD.php';
require 'lib/TADResponse.php';
require 'lib/Providers/TADSoap.php';
require 'lib/Providers/TADZKLib.php';
require 'lib/Exceptions/ConnectionError.php';
require 'lib/Exceptions/FilterArgumentError.php';
require 'lib/Exceptions/UnrecognizedArgument.php';
require 'lib/Exceptions/UnrecognizedCommand.php';

 $tad_factory = new TADPHP\TADFactory();

 use TADPHP\TADFactory;
 use TADPHP\TAD;

 $comands = TAD::commands_available();

 $b1 = (new TADFactory(['ip'=>'192.168.5.150']))->get_instance();

 $dt = $b1->get_date(); // method executed via TAD class.
echo $dt;

I've got the following error:

Fatal error: Uncaught TADPHP\Exceptions\ConnectionError: Imposible iniciar conexión con dispositivo 192.168.5.150 in C:\xampp\htdocs\tad\lib\TAD.php:408 Stack trace: #0 C:\xampp\htdocs\tad\lib\TAD.php(271): TADPHP\TAD->check_for_connection() #1 C:\xampp\htdocs\tad\index.php(24): TADPHP\TAD->__call('get_date', Array) #2 {main} thrown in C:\xampp\htdocs\tad\lib\TAD.php on line 408

Help please!!!

zkenstein commented 5 years ago

Hi @aice09 did you solved this?

Darkthecar commented 5 years ago

how did you solve the problem?