duanfu3634
2015-08-21 07:13
浏览 321

为php 5.6添加mongodb扩展(XAMPP)

I have read few post here on solving my issue but neither works for php-5.6.

I downloaded php_mongo-1.6.8.zip and php_mongo-1.6.7.zip and tried all the .dll extensions and all of them gives one or the other error.

Error message:

  1. PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_mongo-1.6.8-5.6-vc11-x86_64.dll' - %1 is not a valid Win32 application.

    in Unknown on line 0

  2. PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_mongo-1.6.8-5.6-vc11.dll' - The specified module could not be found.

    in Unknown on line 0

P.S.: I am using XAMPP for my environment.

图片转代码服务由CSDN问答提供 功能建议

我已经阅读了一些关于解决我的问题的帖子但是不适用于php-5.6。

我下载了 php_mongo-1.6.8.zip php_mongo-1.6.7.zip 并尝试了所有.dll扩展程序,所有这些扩展程序都会出现一个或另一个错误。

错误消息: \ n

  1. PHP启动:无法加载动态库'C:\ xampp \ php \ ext \ php_mongo-1.6.8-5.6-vc11-x86_64.dll' - %1是 不是有效的Win32应用程序。

    在第0行的未知中

  2. PHP启动:无法加载动态库'C:\ xampp \ php \ ext \ php_mongo-1.6.8-5.6-vc11.dll' - 无法找到指定的模块。

    在第0行的未知中

    PS:我正在为我的环境使用 XAMPP

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

4条回答 默认 最新

  • duanbei3747 2015-09-01 20:01
    已采纳

    I installed mongo extension with following steps:

    Without further configuration, I see mongo extension in command line (C:\xampp\php\php.exe -i | findstr mongo) but Apache complains about missing libsasl.dll and mongo is missing in http://localhost/dashboard/phpinfo.php. Ok, what next?

    • Copy C:\xampp\php\libsasl.dll to C:\xampp\apache\bin\, restart Apache and enjoy.

    This howto worked for me well. I hope it will help to resolve your issue.

    评论
    解决 无用
    打赏 举报
查看更多回答(3条)

相关推荐 更多相似问题