2016-07-28 78 views
-2
工作

您指定沒有正確運行PHP的EXE文件:作曲家不會與當前設置

C:\xampp\php\php.exe

你的命令行PHP中使用的php.ini是:C:\xampp\php\php.ini

程序的輸出:

警告:PHP啓動:mongo:無法初始化模塊
Module com與模塊API堆積= 20121212
PHP編譯模塊API = 20131226
這些選項需要未知匹配在線0

更新

作曲無法找到PHP擴展的mongodb

C:\wamp\www\phpmongodb>composer require "mongodb/mongodb=^1.0.0" 
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug 
./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 
    - mongodb/mongodb 1.0.2 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system. 
    - mongodb/mongodb 1.0.2 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system. 
    - mongodb/mongodb 1.0.1 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system. 
    - mongodb/mongodb 1.0.0 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system. 
    - mongodb/mongodb 1.0.2 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system. 
    - Installation request for mongodb/mongodb ^1.0.0 -> satisfiable by mongodb/mongodb[1.0.0, 1.0.1, 1.0.2]. 

    To enable extensions, verify that they are enabled in those .ini files: 
    - C:\wamp\bin\php\php5.5.12\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. 
+1

您用新的替換了您的原始問題。不要這樣做!我已恢復編輯,以便顯示原始問題並將您的新內容添加爲更新。 –

回答

0

警告: PHP啓動:蒙戈:與模塊API無法初始化模塊 模塊編譯= 20121212 PHP編譯模塊API = 20131226個 這些選項需要在未知匹配在線0

問題

這是一個PHP擴展安裝問題。

錯誤的意思是,PHP擴展mongo不適合你的PHP版本。 它不兼容。

解決方案

之後,Composer和所有其他PHP CLI應用程序應該可以正常工作。

回答更新的問題

the requested PHP extension mongodb is missing from your system

現在,MongoDB是丟失:

  1. 下載
  2. 下降php_mongodb.dll到擴展文件夾
  3. 編輯你的PHP .ini包含擴展名。