-
-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem installing PHP 8.3 extension on Windows #553
Comments
You should not really use Try https://pecl.php.net/package/rdkafka/6.0.3/windows instead. php.net is under PHP group, so unless something goes very wrong, you should use those. A checksum check should also be something you'd do, just to be sure. It is executable code you're allowing to run, so be careful :) |
Detailed steps to reproduce the problem:
Result: Helldar@HellPC MINGW64 /d/php
$ ./php --version
PHP Warning: PHP Startup: Unable to load dynamic library 'rdkafka' (tried: ext\rdkafka (The specified module could not be found), ext\php_rdkafka.dll (The specified module could not be found)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'rdkafka' (tried: ext\rdkafka (The specified module could not be found), ext\php_rdkafka.dll (The specified module could not be found)) in Unknown on line 0
PHP 8.3.9 (cli) (built: Jul 2 2024 18:17:57) (NTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.3.9, Copyright (c) Zend Technologies |
Trying the same steps in the Windows Sandbox.
c:\php>php.exe --version
PHP Warning: PHP Startup: Unable to load dynamic library 'rdkafka' (tried: ext\rdkafka (The specified module could not be found), ext\php_rdkafka.dll (The specified module could not be found)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'rdkafka' (tried: ext\rdkafka (The specified module could not be found), ext\php_rdkafka.dll (The specified module could not be found)) in Unknown on line 0
PHP 8.3.9 (cli) (built: Jul 2 2024 18:17:57) (NTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.3.9, Copyright (c) Zend Technologies |
Checking on other versions: PHP 8.1.29 c:\php>php.exe --version
PHP 8.1.29 (cli) (built: Jun 5 2024 10:43:14) (NTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.29, Copyright (c) Zend Technologies
c:\php>php.exe -m
[PHP Modules]
...
rdkafka
... PHP 8.2.21 c:\php>php.exe --version
PHP Warning: PHP Startup: Unable to load dynamic library 'rdkafka' (tried: ext\rdkafka (The specified module could not be found), ext\php_rdkafka.dll (The specified module could not be found)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'rdkafka' (tried: ext\rdkafka (The specified module could not be found), ext\php_rdkafka.dll (The specified module could not be found)) in Unknown on line 0
PHP 8.2.21 (cli) (built: Jul 2 2024 14:00:59) (NTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.2.21, Copyright (c) Zend Technologies PHP 8.3.9 c:\php>php.exe --version
PHP Warning: PHP Startup: Unable to load dynamic library 'rdkafka' (tried: ext\rdkafka (The specified module could not be found), ext\php_rdkafka.dll (The specified module could not be found)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'rdkafka' (tried: ext\rdkafka (The specified module could not be found), ext\php_rdkafka.dll (The specified module could not be found)) in Unknown on line 0
PHP 8.3.9 (cli) (built: Jul 2 2024 18:17:57) (NTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.3.9, Copyright (c) Zend Technologies |
I have the same problem! |
Hello, I am facing the same issue, did anybody found a solution so far ? |
The problem is solved by compiling the library to a new version of PHP. I haven't found someone who can do that yet |
Why is that ? |
When compiling a DLL, you need to consider the environment and its settings for which the compilation is being done. Given the fact that the DLL runs on PHP 8.1, I can assume that either the PHP 8.2 and 8.3 versions were compiled with PHP 8.1 settings, or with incorrect settings, or the compiler did not take into account any nuances when building for PHP 8.2 and 8.3. For example, the same tests (https://github.com/arnaud-lb/php-rdkafka/actions/runs/9445153156) - they were run on different environments. So there is a nuance somewhere. Either way, you can find out by running the compiler in a customized development environment. Translated with DeepL.com (free version) |
I successfully added the library to my project to work on one of my Windows environments using WampServer and PHP 8.2. However, when I attempted to set it up on my second Windows environment, with the same versions, it did not work. I used the Dependency Walker tool from https://github.com/lucasg/Dependencies to identify any missing dependencies in the DLL files. Despite adding the missing dependencies, the setup still fails to work on the second environment. Does anyone know if there is a requirment list of Windows DLL to make it work ? |
The latest version of this project was released on October 25, 2021. PHP 8.1 was released exactly one month later, on November 25. I doubt that this project will correctly search for missing dependencies for PHP 8.1, 8.2 and 8.3. |
I've looked around Google there are no good looking alternatives in PHP, I will try to dig into the project then |
Also not working for me. Got the DLLs from PECL and they Just Do Not Work. Hope to see a fix here soon! |
Same problem |
same problem |
now i change to python in microservice to get kafka logs instead of using rdkafka. If anyone need for tutorial, you can ask me directly |
The problem is that the Is there anyone who knows how to compile it for the right version of PHP? |
Download php 8.1 for Windows, copy libssl-1_1.dll, libcrypto-1_1.dll from php 8.1 to php 8.2 and it will work. |
@phglong1999, but it won't work for 8.3 anyway. |
Managed to solve this for PHP 8.3 on Windows 11 after some trial and error
|
@andrey-helldar I have installed phprdkafka on version 8.2 |
@andrey-helldar Please follow the instructions to install phprdkafka bth and install OpenSSL. |
I see two problems in this case:
|
Description
I'm trying to connect the rdkafka 6.0.3 extension to PHP 8.3.9, but I'm getting an error:
The rdkafka files are located in the following paths:
php.ini
: https://pastebin.com/nbqTfSuPThat said, there is no problem with the extension installed in Ubuntu WSL.
I also tried deleting the
librdkafka++.dll
file (it was inside the archive), but that didn't help.What could be the problem?
For PHP 8.1 and 8.2, the same problem.
php-rdkafka Version
php-rdkafka 6.0.3
librdkafka Version
No response
PHP Version
PHP 8.3.9
Operating System
Windows 11
Kafka Version
No response
The text was updated successfully, but these errors were encountered: