XAMPP PHP 5.6 和 mongoDB:无法识别 mongo 驱动程序
XAMPP PHP 5.6 and mongoDB : cannot recognize mongo driver
我安装了 XAMPP-Win32-5.6.11-0-VC11。在 phpinfo() 中我可以看到:
PHP版本:5.6.11
PHP 扩展构建:API20131226、TS、VC11
Apache 版本:Apache/2.4.12 (Win32) OpenSSL/1.0.1m PHP/5.6.11
我从这里下载了 PHP mongo 驱动程序:Drivers
我下载的zip文件是:
php_mongo-1.6.4.zip
php_mongo-1.6.5.zip
php_mongo-1.6.6.zip
php_mongo-1.6.7.zip
php_mongo-1.6.8.zip
我试过了:
php_mongo-1..-5.6-vc11.dll
php_mongo-1..-5.6-vc11-x86_64.dll
这 2 个 dll 文件,但其中 none 有效。在 phpinfo() 中,我看不到 mongo 扩展名。如果我尝试使用 nts(非线程安全)文件,我会在重新启动 Apache 服务器时收到 php5.dll not found 错误。
有人可以帮我解决这个问题吗?
好的 1.6.10 已经出来了。检查 PECL。
http://pecl.php.net/package/mongo
然后试试这个:
http://windows.php.net/downloads/pecl/releases/mongo/1.6.10/php_mongo-1.6.10-5.6-ts-vc11-x86.zip
好的,我终于解决了这个问题。当我遇到这个问题时,我正在使用我下载的 xampp,它是最新版本。(xampp-win32-5.6.11-0-VC11-installer.exe) 但我试过了旧版本(xampp-win32-5.5.27-0-VC11-installer.exe)并在完成相同的步骤后一切顺利。现在我可以在我的 phpinfo() 屏幕中看到 mongo。
我安装了 XAMPP-Win32-5.6.11-0-VC11。在 phpinfo() 中我可以看到:
PHP版本:5.6.11
PHP 扩展构建:API20131226、TS、VC11
Apache 版本:Apache/2.4.12 (Win32) OpenSSL/1.0.1m PHP/5.6.11
我从这里下载了 PHP mongo 驱动程序:Drivers
我下载的zip文件是:
php_mongo-1.6.4.zip
php_mongo-1.6.5.zip
php_mongo-1.6.6.zip
php_mongo-1.6.7.zip
php_mongo-1.6.8.zip
我试过了:
php_mongo-1..-5.6-vc11.dll
php_mongo-1..-5.6-vc11-x86_64.dll
这 2 个 dll 文件,但其中 none 有效。在 phpinfo() 中,我看不到 mongo 扩展名。如果我尝试使用 nts(非线程安全)文件,我会在重新启动 Apache 服务器时收到 php5.dll not found 错误。
有人可以帮我解决这个问题吗?
好的 1.6.10 已经出来了。检查 PECL。
http://pecl.php.net/package/mongo
然后试试这个:
http://windows.php.net/downloads/pecl/releases/mongo/1.6.10/php_mongo-1.6.10-5.6-ts-vc11-x86.zip
好的,我终于解决了这个问题。当我遇到这个问题时,我正在使用我下载的 xampp,它是最新版本。(xampp-win32-5.6.11-0-VC11-installer.exe) 但我试过了旧版本(xampp-win32-5.5.27-0-VC11-installer.exe)并在完成相同的步骤后一切顺利。现在我可以在我的 phpinfo() 屏幕中看到 mongo。