php驱动程序mongodb,从未加载 [英] php driver mongodb , never loaded
问题描述
我已经安装了MongoDB,wamp服务器,我已经在MongoDB中添加了一个集合
I have installed MongoDB, wamp server and I have added a collection in MongoDB
然后我从 S3 - >确定
I then downloaded the php_mongo-1.6.8.zip from S3 -> OK
zip文件中有很多文件,但是我需要哪一个? (窗口10 64位)
There are many files in the zip file, but which one is the one I need? (Window 10 64 bit)
我发现我的 php.ini
位置从 phpinfo )
在 C:\wamp\bin\apache\apache2.4.9\bin\php.ini
,我插入这个 extension = php_mongo.dll
中的字符串。在c:/wamp/bin/php/php5.5.12/ext/ copy(用于测试)php_mongo-1.6.8-5.6-vc11.dll(在php_mongo.dll中重命名)。
I found my php.ini
location from phpinfo()
in C:\wamp\bin\apache\apache2.4.9\bin\php.ini
and I inserted this string in extension=php_mongo.dll
. In c:/wamp/bin/php/php5.5.12/ext/ copy (for test) the php_mongo-1.6.8-5.6-vc11.dll (renamed in php_mongo.dll).
我可以重新启动apache没有错误,并在我的主机中调用mongo.php
I can restart apache without errors and call mongo.php in my host
echo extension_loaded("mongo") ? "mongo loaded\n" : "mongo not loaded\n";
echo "<br>";
echo extension_loaded("mysql") ? " mysql loaded\n" : " mysql not loaded\n";
这是打印:
mongo未加载
mongo not loaded
加载mysql
为什么不是mongo驱动程序加载?
Why isn't the mongo driver loading?
推荐答案
问题是API编译版本。使用版本1.4.5的mongodb驱动程序现在都可以正常工作。
the problem is the API compile version. With the version 1.4.5 mongodb driver now all work fine.
我的Window 10 64位和Wamp64bit的正确驱动程序是php_mongo-1.4.5-5.5 -vc11-x86_64.dll
这篇关于php驱动程序mongodb,从未加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!