duangan6797 2013-11-25 13:11
浏览 61
已采纳

如何在laravel4中使用MongoDB?

I have successfully installed Mongodb on my win 7 system. I also installed php extension for MongoDB on my Wamp server and it works perfectly; yet I wish to know how I can use MongoDB in my laravel4 projects. I will like to use mongovel package but when I run 'composer update' there is always an error: php extension not found in your system. Also I installed jessengers package but got an error: MongoClient not available. Please I need help on how to get out of this. Thanks

  • 写回答

1条回答 默认 最新

  • douzhang3356 2013-11-25 13:34
    关注

    You need to make sure that the extension is also available on the command line. In many cases there is a different php.ini for CLI. You can find this out by running:

    php --ri mongo
    

    if that does not provide any sort of output about version and settings, you don't have it installed properly.

    Then you can use php --ini to find out where your INI files are - the ones that are used for running PHP on the command line

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器