-2

The PHP exe file you specified did not run correctly:

C:\xampp\php\php.exe

The php.ini used by your command-line PHP is: C:\xampp\php\php.ini

Program Output:

Warning: PHP Startup: mongo: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match in Unknown on line 0

Update

Composer can't find mongodb extension in php

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.
Jens A. Koch
  • 39,862
  • 13
  • 113
  • 141
  • 1
    You replaced your original question with a new one. Don't do that! I've reverted your edit, so that the original question is shown and added your new content as an update. – Jens A. Koch Jul 29 '16 at 10:47

1 Answers1

0

Warning: PHP Startup: mongo: Unable to initialize module Module compiled with module API=20121212 PHP compiled with module API=20131226 These options need to match in Unknown on line 0

Problem

This is a PHP Extension installation issue.

The error means, that the PHP Extension mongo doesn't fit your PHP version. It's incompatible.

Solution

After that, Composer and all other PHP CLI applications should work normally.

Answer for the updated question

the requested PHP extension mongodb is missing from your system

Now, mongodb is missing:

  1. Download
  2. drop php_mongodb.dll into the extension folder
  3. edit your php.ini to include the extension.
Jens A. Koch
  • 39,862
  • 13
  • 113
  • 141