如何让 MongoDB 与 php 5.3.5 和 php 一起使用?旺普?
我不断收到此错误(来自 apache 日志),并且无法使用 32 位版本的 mongo 和 wamp 加载 php_mongo.dll 模块。
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.5/ext/php_mongo.dll' - The specified module could not be found.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.5/ext/php_mongo.dll' - The specified module could not be found.
in <b>Unknown</b> on line <b>0</b><br />
最令人沮丧的是,我可以看到该文件位于错误消息告诉我找不到它的确切目录中!我已经重新检查了 php.ini 编辑是否正确,但是当 php 启动时我仍然无法加载模块。你知道第 0 行未知中的“\r\n”可能对应什么吗?
php 5.3.5 阿帕奇2.2.17 视窗 7
谢谢!
I keep receiving this error (from the apache log) and I cannot get the php_mongo.dll module loaded with the 32bit versions of both mongo and wamp.
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.5/ext/php_mongo.dll' - The specified module could not be found.\r\n in Unknown on line 0
<br />
<b>Warning</b>: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.5/ext/php_mongo.dll' - The specified module could not be found.
in <b>Unknown</b> on line <b>0</b><br />
Whats most frustrating is the fact that I can see the file sitting in the exact directory the error message is telling me it can't find it! I've rechecked the php.ini edits were correct, but I still can't get the module to load when php starts up. Any ideas what the '\r\n in Unknown on line 0' may correspond to?
php 5.3.5
apache 2.2.17
windows 7
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
确保您使用 mongodb 扩展插件的线程安全版本。我在使用非线程安全版本时偶然发现了完全相同的错误。
要下载正确的扩展,请参阅: http://www .php.net/manual/en/mongo.installation.php#mongo.installation.windows
您很可能需要 VC9(线程安全)版本。
Make sure you use the thread safe version of the mongodb extension plugin. I stumbled upon the exact same errors while using the non-thread-safe versions.
To download the right extension, see: http://www.php.net/manual/en/mongo.installation.php#mongo.installation.windows
Most likely you'll need the VC9 (Thread Safe) version.
php_mongo-1.4.3-5.3-vc9-x86_64.dll 在 wamp 2.2、PHP 5.3.8、Windows 7 64 位上为我工作
这些较新的版本
php_mongo-1.4.3-5.5-vc11-x86_64.dll
php_mongo-1.4.3- 5.4-vc9-x86_64.dll
不适用于 我。
他们给出了相同的错误:“无法加载动态库 - 找不到指定的过程”。
另外 - 确保 MongoDB 数据库进程正在每个网页上运行:
http://docs.mongodb.org/manual/tutorial/install- mongodb-on-windows/
php_mongo-1.4.3-5.3-vc9-x86_64.dll worked for me on wamp 2.2, PHP 5.3.8, Windows 7 64bit
These newer versions
php_mongo-1.4.3-5.5-vc11-x86_64.dll
php_mongo-1.4.3-5.4-vc9-x86_64.dll
didn't work for me.
They gave the same error: 'Unable to load dynamic library - The specified procedure could not be found'.
Also - make sure the MongoDB database process is running per this webpage:
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/
我在 xampp 中遇到了同样的错误。我尝试过旧版本的线程安全 mongodb 并且它有效。
I got same error in xampp. I have tried with older version of thread safe mongodb and it worked.