我已经尝试安装 mongodb 6 个多小时了,但仍然没有成功。我将非常详细地说明这一点,以便希望有人能帮助我完成这项工作。
My local comp: HP laptop, Windows 7, 64 bit operating system
WAMP 2.2 which includes php 5.3.8 and apache 2.2.21 downloaded from wampserver.com
我尝试安装 mongodb 的每个组合,但没有成功。
我首先从 mongos 网站下载 64 位版本。当我从命令行 shell 使用它时它工作正常,但是一旦我安装了php_mongo.dll
并从 PHP 使用它,我收到“mongo not found”错误。另外,我检查了我的php.ini
文件和 mongo 未加载。我检查了错误并看到“php_mongo.dll 不是 win32 应用程序”。
然后我尝试安装一个新的php_mongo.dll
那是 vc9 因为那是我的php.ini
文件说。我仍然遇到同样的问题,当我从命令行使用它时它可以工作,但在 PHP 中却不行。
然后我删除了所有 mongo 文件,treid 下载了 32 位版本的 mongo 只是为了尝试一下(我的操作系统是 64 位)。同样的事情,在命令行 shell 中有效,但在 PHP 中无效。我得到与上面相同的错误。
My php.ini
文件看起来像这样:
System Windows NT xxxxx-PC 6.1 build 7601 (Windows 7 Home Premium Edition
Service Pack 1) AMD64
Build Date Sep 16 2011 21:25:01
Compiler MSVC9 (Visual C++ 2008)
Architecture x64
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--with-
pdo-oci=C:\php-sdk\php53dev\vc9\x64\deps\instantclient_10_2\sdk,shared" "--with-
oci8=C:\php-sdk\php53dev\vc9\x64\deps\instantclient_10_2\sdk,shared" "--with-
oci8-11g=C:\php-sdk\php53dev\vc9\x64\deps\instantclient_11_2\sdk,shared" "--disable-
debug-pack" "--disable-static-analyze"
Server API Apache 2.0 Handler
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\Windows
Loaded Configuration File C:\wamp\bin\apache\Apache2.2.21\bin\php.ini
Scan this dir for additional .ini files (none)
Additional .ini files parsed (none)
PHP API 20090626
PHP Extension 20090626
Zend Extension 220090626
Zend Extension Build API220090626,TS,VC9
PHP Extension Build API20090626,TS,VC9
Debug Build no
Thread Safety enabled
Zend Memory Manager enabled
Zend Multibyte Support disabled
IPv6 Support enabled
Registered PHP Streams php, file, glob, data, http, ftp, zip, compress.zlib, phar
Registered Stream Socket Transports tcp, udp
Registered Stream Filters convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13,
string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk,
zlib.*
我不知道我做错了什么。同样,我已经尝试了下载的每种组合,但无法从 php 获得连接。有人可以根据我的系统设置的上述信息引导我完成下载或指出我做错了什么吗?
我已经尝试了 mongos 站点的基本设置选项。我还花了几个小时在谷歌上搜索,从其他博客上我知道 64 位组件存在一些问题,而且还有很多其他人遇到了这些相同的错误。我似乎找不到有效的答案或足够详细的答案供新手遵循。
感谢您的任何帮助。我只是不知道此时该做什么,我已经花了 6 个多小时来设置 mongo。有人可以帮忙吗?