dsms21398 2017-03-21 19:19
浏览 55
已采纳

php symfony错误mongoDB

I have problem with configuration MongoDB Symfony Program doesnt see class \MongoDbBudle\ to I went to Tools -> Composer -> add -> "doctrine/mongodb-odm". I tried to install it but I saw error:

C:\wamp64\bin\php\php7.0.10\php.exe C:\Users\Root\PhpstormProjects\untitled2\composer.phar require doctrine/mongodb-odm:1.2.x-dev -n --no-progress
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Removal request for alcaeus/mongo-php-adapter == 1.1.9999999.9999999-dev
- Removal request for alcaeus/mongo-php-adapter == 9999999-dev
- doctrine/mongodb-odm 1.2.x-dev requires doctrine/mongodb ^1.4.0 -> satisfiable by doctrine/mongodb[1.4.0].
- doctrine/mongodb 1.4.0 requires ext-mongo ^1.5 -> satisfiable by alcaeus/mongo-php-adapter[1.1.x-dev, dev-master].
- Installation request for doctrine/mongodb-odm 1.2.x-dev -> satisfiable by doctrine/mongodb-odm[1.2.x-dev].
To enable extensions, verify that they are enabled in your .ini files:
- C:\wamp64\bin\php\php7.0.10\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

Installation failed, reverting ./composer.json to its original content.

php.ini seems to be ok. I added dynamic extension mongo-dll: http://pastebin.com/bfb34A0s

Please help me how to solve this problem.

  • 写回答

1条回答 默认 最新

  • doulongsha5478 2017-03-23 16:10
    关注

    Using ODM with PHP 7 is a bit trickier than it should, please check if adding

    "provide": {
        "ext-mongo": "1.6.14"
    }
    

    to your project's composer.json would solve the issue. Otherwise you can see full chapter on how to use ODM with PHP 7 in the official documentation

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

报告相同问题?

悬赏问题

  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python