I have Laravel 4 installed on WAMP and it works fine with the MySQL backend.
I have successfully configured a second virtual host and would like to use a backend MongoDB. After searching, I found out that Laravel is not connecting to MongoDB, and I found https://github.com/jenssegers/Laravel-MongoDB , and I tried to configure it, but I can't seem to be correct. Obviously, I have to do something wrong, and I hope that someone can help me determine what it is that I am wrong.
I edited composer.jsonaccording to the instructions:
............
"license": "MIT",
"require": {
"laravel/framework": "4.1.*",
"jenssegers/mongodb": "*"
},
"autoload": {
.........
Then I launched composer update. He installed monolog 1.9.1 and swiftmailer v5.2.0 - whatever it was - successfully (a few days ago), but then made a mistake after that. Today I tried to run again composer update, and it updated two to 1.10.0 and v5.2.1 respectively, and then ran into the same error. Now when I try composer update, it successively produces the same error:
Nothing to install or update
Generating autoload files
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","me
ssage":"Class 'MongoClient' not found","file":"C:\\wamp\\www\\laravel\\vendor\\j
enssegers\\mongodb\\src\\Jenssegers\\Mongodb\\Connection.php","line":132}}Script
php artisan clear-compiled handling the post-update-cmd event returned with an
error
[RuntimeException]
Error Output:
update [
[
dependencies] [-v|vv|vvv|
packagesN]
What I tried :
I downloaded and installed php_mongo.dll, placing it in the php ext folder and including it in php.ini:
extension=php_mongo.dll
But it did not help.
source
share