0

I'm trying to configure Laravel 5 with MongoDB by this link.

Error

D:\wamp\www\lfirst>composer require jenssegers/mongodb You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug Using version ^3.0 for jenssegers/mongodb ./composer.json has been updated

php artisan clear-compiled 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.2 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.
- Installation request for mongodb/mongodb (locked at 1.0.2) -> satisfiable by mongodb/mongodb[1.0.2].

   To enable extensions, verify that they are enabled in those .ini files:
- D:\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.

 D:\wamp\www\lfirst>php --ini
 Configuration File (php.ini) Path: C:\Windows
 Loaded Configuration File:         D:\wamp\bin\php\php5.5.12\php.ini
 Scan for additional .ini files in: (none)
 Additional .ini files parsed:      (none)

Note

I using Window server; for other projects I'm using MongoDB too but it's process is only a problem with Laravel.

Karl Hill
  • 12,937
  • 5
  • 58
  • 95
ching
  • 122
  • 7
  • you have to install mongodb extension for php – Mateusz Sip Jun 22 '16 at 02:28
  • Yes, sure, I run `composer show -p`, it's show that `ext-mongo 1.6.8 The mongo PHP extension `, I think that I correct at all – ching Jun 22 '16 at 02:35
  • ext-mongodb and ext-mongo are two different things. mongodb is recommended, mongo is a deprecated one. – Mateusz Sip Jun 22 '16 at 02:42
  • could you point me a bout it? – ching Jun 22 '16 at 03:03
  • 1
    [This is the one that he's talking about](http://php.net/manual/en/set.mongodb.php). You should be moving to that extension due to the deprecation in the `mongo` estension. – Ohgodwhy Jun 22 '16 at 03:21
  • In this [link](https://pecl.php.net/package/mongodb/1.1.3/windows) I can find the mongodb driver (php_mongodb.dll) for PHP on Windows systems. Download the correct version for PHP and the system (x86 or x64) driver. Copy this DLL in the extension folder, in my case C:\wamp64\bin\php\php5.6.16\ext and add this line in php.ini: extension=php_mongodb.dll. Restart the Apache server and try again. Note that you must edit the php.ini file in this path (C:\wamp64\bin\php\php5.6.16, if used Wamp) and not Wamp icon on the taskbar. – ching Jun 22 '16 at 04:14
  • I hope can help to someone meet problem like me – ching Jun 22 '16 at 04:14

0 Answers0