简体   繁体   English

找不到mongodb PHP扩展?

[英]mongodb PHP extension not found?

I followed the manual, I mpved the php_mongo.dll into the PHP extension folder, and added extension=php_mongo.dll to the php.ini file and it's given me an error when I try and you rockmango that "To make things right, you must install php_mongo module. Here for installation documents on PHP.net." 我按照手册,将php_mongo.dll添加到PHP扩展文件夹中,并将扩展名= php_mongo.dll添加到php.ini文件中,当我尝试时你给我一个错误,并且你知道“为了使事情正确,你必须安装php_mongo模块。这里是PHP.net上的安装文档。“ but I have alread done this any solutions? 但是我已经完成了任何解决方案吗? I am running the lattest version of PHP and mongodb 我正在运行最新版本的PHP和mongodb

Check php --ini shows the correct config file being used. 检查php --ini显示正在使用的正确配置文件。

Check php -i (phpinfo) and make sure the module is actually loaded. 检查php -i (phpinfo)并确保模块实际已加载。

Double check you have the right flavour of the module for your version of PHP. 仔细检查您的PHP版本是否具有正确的模块风格。 (VC6, VC8, VC9, TS, NTS, etc.) (VC6,VC8,VC9,TS,NTS等)

I got my mongo module (1.2.9) for PHP 5.4 32bit on windows from stealth35 . 我从stealth35获得了用于PHP 5.4 32bit的mongo模块(1.2.9)。 It works like a charm. 它就像一个魅力。

Often there are multiple PHP locations with different php.ini files. 通常有多个PHP位置具有不同的php.ini文件。

If you are worried about working in mod_php (through apache) or as a fastcgi then create a file with the following contents. 如果您担心在mod_php(通过apache)或fastcgi中工作,则创建一个包含以下内容的文件。

<?php phpinfo();

Then visit that file in a browser. 然后在浏览器中访问该文件。 It will have all the settings and modules listed that are currently being loaded. 它将列出当前正在加载的所有设置和模块。 It will also tell you which php.ini file and modules directory being used. 它还会告诉您正在使用哪个php.ini文件和模块目录。

Please make sure that the ini listed is the one you added mongo dll line. 请确保列出的ini是您添加的mongo dll行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM