问题
I'm working on Wampserver on Windows 10. I'm using an extension called ZMQ. I downloaded the DLLS from: https://pecl.php.net/package/zmq/1.1.3/windows
I previously used the version of the extension for PHP 5.6 and it worked. The extension however had a bug, so I decided to upgrade my php version to 7.0.4 and try the new version of the extension. The extension was successfully installed and it appears in the phpinfo(), but when I try to run "php -v" from the command line (or the CLI service that uses the extension), I get the following error: "Warning: PHP Startup: Unable to load dynamic library 'D:/wamp64/bin/php/php7.0.4/ext/php_zmq.dll' - The specified module could not be found. in Unknown on line 0"
The weird thing is the file "php_zmq.dll" actually exists in the specified path.
Important note: I have the line "extension=php_zmq.dll" in both my "D:\wamp64\bin\apache\apache2.4.18\bin\php.ini" and my "D:\wamp64\bin\php\php7.0.4\php.ini" (which to my understanding is used by the CLI). I can't remove either of those lines because then the extension is removed, or it doesn't work in the CLI.
回答1:
I had the same problem. using PHP 7.0 x64 TS. I used the exact dll from pecl but same error. all my other extensions load fine and are in the same directory
i followed all instructions on https://superuser.com/questions/585291/installing-zeromq-on-windows-7-wamp-server.
the main updates would be to do the following:
copy libzmq.dll
and libsodium.dll
to php root dir. (both are found in the pecl zip files.
来源:https://stackoverflow.com/questions/40412911/php-zmq-extension-unable-to-load-dynamic-library