PHP启动:无法加载动态库"php_mongodb.dll" [英] PHP Startup: Unable to load dynamic library 'php_mongodb.dll'
问题描述
我试图通过遵循 我继续提取从 D:\ xampp \ php \ ext 上的"nofollow noreferrer> pecl (适用于Windows的mongodb 1.6.0,7.3非线程安全,x64),并添加 I proceeded on extracting 在将要使用的命令行PHP"选择为 After selecting 'the command-line PHP you want to use' to 您指定的PHP exe文件未正确运行:D:\ xampp \ php \ php.exe The PHP exe file you specified did not run correctly:
D:\xampp\php\php.exe 您的命令行PHP使用的php.ini是:D:\ xampp \ php \ php.ini The php.ini used by your command-line PHP is: D:\xampp\php\php.ini 您的php.ini中的设置可能会导致问题:"extension_dir"值不正确或dll不存在. A setting in your php.ini could be causing the problem: Either the
'extension_dir' value is incorrect or the dll does not exist. 程序输出:PHP警告:PHP启动:无法动态加载库'php_mongodb.dll'(尝试:D:\ xampp \ php \ ext \ php_mongodb.dll(指定的模块无法找到.),D:\ xampp \ php \ ext \ php_php_mongodb.dll.dll(指定的模块可以找不到).)在第0行的未知"中 Program Output: PHP Warning: PHP Startup: Unable to load dynamic
library 'php_mongodb.dll' (tried: D:\xampp\php\ext\php_mongodb.dll
(The specified module could not be found.),
D:\xampp\php\ext\php_php_mongodb.dll.dll (The specified module could
not be found.)) in Unknown on line 0 D:\ xampp
上成功安装了XAMPP 7.3.11,并测试了是否可以访问服务器(在浏览器上输入 localhost:80
) extension =文件
D:\ xampp \ php \ php.ini
D:\xampp
succesfully and tested that the server can be reached (enter localhost:80
on browser)php_mongodb.dll
I got from pecl(mongodb 1.6.0 for Windows, 7.3 Non Thread Safe, x64 ) on D:\xampp\php\ext
and add the line extension=php_mongodb.dll
on the file D:\xampp\php\php.ini
D:\ xampp \ php \ php.exe
后,安装程序将提供以下输出:D:\xampp\php\php.exe
, the setup then gave the following output:
注释该行 extension = php_mongodb.dll
将执行 D:\ xampp \ php \ php.exe
,而不会发出任何警告.但是我需要php在作曲家安装期间知道 php_mongodb.dll
,对吧?
Commenting out the line extension=php_mongodb.dll
will execute D:\xampp\php\php.exe
without any warning. But I would need php to be aware of php_mongodb.dll
during composer installation, right?
那么如何解决这个问题呢?该文件肯定存在于文件夹中,并且已提供对 php.ini
的所需修改.我已经环顾四周,有些人提到 extension_dir
中的路径必须用完整路径编写.但是我已经检查了 php.ini
上的行是否为 extension_dir ="D:\ xampp \ php \ ext"
So how to resolve this problem? The file definitely exists in the folder, and the required modification on php.ini
has been provided.
I have already looked around and some people mentioning the path in extension_dir
must be written in full path. But I have already checked that the line on my php.ini
is extension_dir="D:\xampp\php\ext"
推荐答案
问题已解决.
原因:我使用的是非线程安全的 php_mongodb.dll
,而XAMPP安装的PHP是一个线程安全的.
Cause: I was using Non Thread Safe php_mongodb.dll
, while the PHP installed by XAMPP is a Thread Safe one.
用线程安全版本替换 php_mongodb.dll
后,没有任何错误,我可以成功完成composer的安装.
After replacing php_mongodb.dll
with the thread safe version, there's no error and I can successfully completed composer installation.
这篇关于PHP启动:无法加载动态库"php_mongodb.dll"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!