PHP ZMQ 扩展:无法加载动态库 [英] PHP ZMQ Extension: Unable to load dynamic library

查看:33
本文介绍了PHP ZMQ 扩展:无法加载动态库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 Windows 10 上开发 Wampserver.我正在使用一个名为 ZMQ 的扩展.我从以下位置下载了 DLLS:https://pecl.php.net/package/zmq/1.1.3/窗户

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

我之前使用了 PHP 5.6 的扩展版本,并且可以正常工作.然而这个扩展有一个错误,所以我决定将我的 php 版本升级到 7.0.4 并尝试新版本的扩展.该扩展已成功安装并出现在 phpinfo() 中,但是当我尝试从命令行(或使用该扩展的 CLI 服务)运行php -v"时,出现以下错误:警告:PHP启动:无法加载动态库 'D:/wamp64/bin/php/php7.0.4/ext/php_zmq.dll' - 找不到指定的模块.在第 0 行未知"

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"

奇怪的是文件php_zmq.dll"实际上存在于指定路径中.

The weird thing is the file "php_zmq.dll" actually exists in the specified path.

重要说明:我的D:\wamp64\bin\apache\apache2.4.18\bin\php.ini"和"D:\wamp64\bin\php\php7.0.4\php.ini"(据我所知是 CLI 使用的).我无法删除这些行中的任何一行,因为随后扩展名被删除,或者它在 CLI 中不起作用.

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.

推荐答案

我遇到了同样的问题.使用 PHP 7.0 x64 TS.我使用了 pecl 中的确切 dll 但同样的错误.我所有的其他扩展都可以正常加载并且位于同一目录中

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

我遵循了 https://superuser.com/questions/上的所有说明585291/installing-zeromq-on-windows-7-wamp-server.

主要更新将执行以下操作:

the main updates would be to do the following:

复制 libzmq.dlllibsodium.dll 到 php 根目录.(两者都可以在 pecl zip 文件中找到.

copy libzmq.dll and libsodium.dll to php root dir. (both are found in the pecl zip files.

这篇关于PHP ZMQ 扩展:无法加载动态库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆