Windows 8 上的 PHP 扩展 (wamp) : confusion: 32 bit or 64 bit

标签 php mongodb windows-8.1 wampserver

我有 32 位 Windows 8.1,处理器是 x64 Intel Pentium

我在 wampserver 上运行 apache 2.4.9 和 php phpinfo:PHP 版本 5.5.12,架构 x86,编译器 MSVC11 (Visual C++ 2012)

尝试安装 php_mongo.dll

如果我使用php_mongo-1.5.5-5.5-vc11-x86_64.dll我会收到0xc000035a Windows错误, 当我使用 php_mongo-1.5.5-5.5-vc11.dll 时,我收到 PHP 错误“ fatal error :在...中找不到类'MongoClient'”和扩展名 php_mongo在wamp php扩展菜单中标有感叹号:参见图片

enter image description here

最佳答案

好的 第 1 点,如果您像您所说的那样运行 32 位 Windows,那么您必须使用 32 位 WampServer(我假设您使用了)以及 32 位 mongo 扩展。

第 2 点,在 WAMPServer 中,您会收到一个针对 PHP 扩展的警告符号,它通常意味着以下两件事之一:-

  • \ext 文件夹中有一个 dll,但 php.ini 中没有与之匹配的 extension=???
  • 您的 php.ini 中有一个 extension=???,但 \ext 文件夹中没有与其匹配的 dll。

如果上述信息不能解决您的问题,this recent similiar question ,似乎表明 php_mongo-1.5.1-5.5-vc11.dll 对提问者有效,而 1.5.5 版本则无效。我会尝试该版本,请记住您将需要线程安全版本,即名称中不带 -nts 的文件。

关于Windows 8 上的 PHP 扩展 (wamp) : confusion: 32 bit or 64 bit,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25513531/

相关文章:

php - Windows 上的 PHP CLI 选项

php - MySQL 从两个查询中获取匹配结果?

linq - 流畅的 mongo Count() 性能

javascript - WinJS URL 字段, '.com' 关键问题

php - 在 PHP 中将数据库描述字符串转换为 html 代码

mongodb - 如何在数据库中存储和索引 Draft.js 输出?

javascript - 外部函数调用、promise、async 和 Mongo - 困惑

multithreading - 在Windows Store App中生成线程会在UI线程中的任何定时等待调用中导致死锁

windows - Directshow - 识别内置(集成摄像头)与外部 USB 摄像头

javascript - YUICompressor 或 PHP 中的类似软件?