PHP ZKLib undefined function socket_create() - php

I am starting doing a simple project using ZKTeco and its SDK for PHP or online SDK to connect the data from biometrics to our database. I try to use then https://github.com/dnaextrim/php_zklib because almost of the discussion from googling link to this.
Now I got an error:
> Fatal error: Uncaught Error: Call to undefined function
> socket_create() in C:\xampp\htdocs\php_zklib-master\zklib\zklib.php:16
> Stack trace: #0 C:\xampp\htdocs\php_zklib-master\zktest.php(10):
> ZKLib->__construct('192.168.5.164', 4370) #1 {main} thrown in
> C:\xampp\htdocs\php_zklib-master\zklib\zklib.php on line 16
What is the following cause of this error and what is the following solution about this?

if you are using xampp enable php_sockets.dll by removing ';' from ;extension=php_sockets.dll in php.ini file and restart the xampp.
if you are working in server contact to your server provider.

Related

Fatal error: Uncaught Error: Call to undefined function get_json_data()

Here's the error upon opening php file using Docker Desktop:
0.1.2
Fatal error: Uncaught Error: Call to undefined function get_json_data() in C:\laragon\www\myproject\public\index.php:37 Stack trace: #0 C:\laragon\www\myproject\public\index.php(40): get_channels() #1 {main} thrown in C:\laragon\www\myproject\public\index.php on line 37
Local link is: localhost
I have the ff. extensions installed on VSCode:
PHP Debug
PHP Intelephense
PHP Extension Pack
PHP IntelliSense
use json_decode instead of get_json_data
It seems that the edit in settings.JSON inside VS Code had this wrong path:
"php.validate.executablePath": "C:/xampp/php/php.exe"
I had to delete the project and clone it again and now it works fine. Path shows:
"php.validate.executablePath": "C:/laragon/bin/php/php-7.4.19-Win32-vc15-x64/php.exe",
Thank you!

Vdeo-Call-App Fatal Error

I want to use Video-Call-App made by amirsanni.
Video-Call-App
in local server using wampserver it was great but i can't run it on server and i get this Fatal error :
Fatal error: Uncaught React\Socket\ConnectionException: Could not bind to
tcp://0.0.0.0:8080: Address already in use in
/srv/disk16/2535675/www/arash.mygamesonline.org/video-call-
app/ws/vendor/react/socket/src/Server.php:35 Stack trace: #0
/srv/disk16/2535675/www/arash.mygamesonline.org/video-call-
app/ws/vendor/cboden/ratchet/src/Ratchet/App.php(80): React\Socket\Server-
>listen(8080, '0.0.0.0') #1
/srv/disk16/2535675/www/arash.mygamesonline.org/video-call-
app/ws/bin/server.php(18): Ratchet\App->__construct('http://arash.my...',
8080, '0.0.0.0') #2 {main} thrown in
/srv/disk16/2535675/www/arash.mygamesonline.org/video-call-
app/ws/vendor/react/socket/src/Server.php on line 35
may help me run this app on server ? i'm new to this field please say me any thing that you think may i didn't do to run app.

PDO : Uncaught PDOException: could not find driver

I'm using odbc and XAMPP. I'm receiving the fatal error of could not find driver
Fatal error: Uncaught PDOException: could not find driver in C:\xampp\htdocs\index.php:5 Stack trace: #0 C:\xampp\htdocs\index.php(5): PDO->__construct('odbc:BEGIN') #1 {main} thrown in C:\xampp\htdocs\index.php on line 5
This is the code the error refering to :
$conn = new PDO ("odbc:BEGIN");
Is there any module that I should add to the php.ini like this answer or there are other solution?
You need to enable those extensions in order to have ODBC PDO driver working
php_pdo.dll
php_odbc.dll
php_pdo_odbc.dll
After enabling those extension as #Sarhan said, we need to restart Apache in order for it to work.

I got some error in this code for two file. One is workshop_connect.php and another is workshop_retrieve.php

$con = mysql_connect('HOSTNAME', 'USER', 'PASSWORD');
I run with the above code and it shows the error below
Fatal error: Uncaught Error: Call to undefined function
mysql_connect() in
C:\xampp\htdocs\DatabaseIntegration-master\workshop_connect.php:3
Stack trace: #0 {main} thrown in
C:\xampp\htdocs\DatabaseIntegration-master\workshop_connect.php on
line 3
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in
C:\xampp\htdocs\DatabaseIntegration-master\workshop_retrieve.php:3
Stack trace: #0 {main} thrown in
C:\xampp\htdocs\DatabaseIntegration-master\workshop_retrieve.php on
line 3
If you are use PHP 7+ MYSQL no longer exist, try MYSQLi
if you are using any 5.x version, follow below
Try checking if the PHP MySQL extension is enabled or not.
<?php
phpinfo();
?>
if you cannot find mysql extension there, theme mysql extension is not enabled.
Locate php.ini file, and edit it.
find the line
;extension=php_mysql.dll
and remove ; from the line
extension=php_mysql.dll

Fatal error: Uncaught Error: Class 'mysqli' not found -- IIS- Windows 7

I got this error whenever I open my project. This project can run on my other laptop which is using XAMPP.
I want to use IIS 6.0 on my Windows 7 Pro.
I already installed IIS, Setting environment variable, remove semicolon on my php.ini-development, add handler. So confusing and still not get the right answer.
Fatal error: Uncaught Error: Class 'mysqli' not found in C:\inetpub\wwwroot\SIA-2\general\function.php:8 Stack trace: #0 C:\inetpub\wwwroot\SIA-2\general\initial.php(10): open_connection() #1 C:\inetpub\wwwroot\SIA-2\index.php(41): include_once('C:\inetpub\wwwr...') #2 {main} thrown in C:\inetpub\wwwroot\SIA-2\general\function.php on line 8
https://drive.google.com/folderview?id=0B66OIQlx1mwzc0JVbVhjX0U0aDQ&usp=sharing
please do not give me any documentation. i'm sick of it. thank you.

Categories