zeromq / php-zmq

ZeroMQ for PHP
http://pecl.php.net/zmq
Other
551 stars 119 forks source link

Unable to load dynamic library 'php_zmq.dll' PHP 7.4.26 #237

Closed madsongr closed 2 months ago

madsongr commented 2 months ago

I was reading this issue #193 trying to solve my problem but I always get this message:

Warning: PHP Startup: Unable to load dynamic library 'php_zmq.dll' (tried: c:/wamp64/bin/php/php7.4.26/ext/php_zmq.dll (could not find specified module)...

I'm following the instructions from http://socketo.me/docs/push, where I updated my composer.json to include "react/zmq": "0.2.|0.3.". After that, I type composer update in my prompt and I always get that message.

Warning: PHP Startup: Unable to load dynamic library 'php_zmq.dll' (tried: c:/wamp64/bin/php/php7.4.26/ext/php_zmq.dll (could not find specified module.), c:/wamp64/bin/php/php7.4.26/ext/php_php_zmq.dll.dll (could not find specified module.)) in Unknown on line 0
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - react/zmq[v0.2.0, ..., v0.3.0] require ext-zmq * -> it is missing from your system. Install or enable PHP's zmq extension.
    - Root composer.json requires react/zmq 0.2.*|0.3.* -> satisfiable by react/zmq[v0.2.0, v0.3.0].

To enable extensions, verify that they are enabled in your .ini files:
    - C:\wamp64\bin\php\php7.4.26\php.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-zmq` to temporarily ignore these required extensions.

I have already enabled it in php.ini but it doesn't work.

php.ini

; Notes for Windows environments :
;
; - Many DLL files are located in the extensions/ (PHP 4) or ext/ (PHP 5+)
;   extension folders as well as the separate PECL DLL download (PHP 5+).
;   Be sure to appropriately set the extension_dir directive.
...
extension=openssl
;extension=pdo_firebird
extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
;extension=pdo_pgsql
extension=pdo_sqlite
;extension=pgsql
;extension=phpdbg_webhelper
;extension=shmop
extension=php_zmq.dll
madsongr commented 2 months ago

In opposition to what was said in issue #193, I renamed php_zmq_zts.dll to php_zmq.dll and only pasted that version in php ext folder. No errors or warnings were displayed and it seems to be installed.