2
votes

I use xampp 32 bit PHP 7.1.1

I had install mongodb 3.4.2 on my windows (windows 8 pro 64 bit)

And I also had install the driver (php_mongodb.dll)

I get from here : https://pecl.php.net/package/mongodb/1.2.5/windows (7.1 Thread Safe (TS) x86)

But, when my system executed, there still exist error :

Whoops, looks like something went wrong.

1/1 InvalidArgumentException in ConnectionFactory.php line 278: Unsupported driver [mongodb] in ConnectionFactory.php line 278 at ConnectionFactory->createConnection('mongodb', object(Closure), 'myappdb', '', array('driver' => 'mongodb', 'host' => '127.0.0.1', 'port' => '27017', 'database' => 'myappdb', 'username' => '', 'password' => '', 'options' => array('database' => 'admin'), 'prefix' => '', 'name' => 'mongodb')) in ConnectionFactory.php line 64 at ConnectionFactory->createSingleConnection(array('driver' => 'mongodb', 'host' => '127.0.0.1', 'port' => '27017', 'database' => 'myappdb', 'username' => '', 'password' => '', 'options' => array('database' => 'admin'), 'prefix' => '', 'name' => 'mongodb')) in ConnectionFactory.php line 50 at ConnectionFactory->make(array('driver' => 'mongodb', 'host' => '127.0.0.1', 'port' => '27017', 'database' => 'myappdb', 'username' => '', 'password' => '', 'options' => array('database' => 'admin'), 'prefix' => '', 'name' => 'mongodb'), 'mongodb') in DatabaseManager.php line 176 at DatabaseManager->makeConnection('mongodb') in DatabaseManager.php line 68 at DatabaseManager->connection('mongodb') in Model.php line 3351 at Model::resolveConnection('mongodb') in Model.php line 3317 at Model->getConnection() in Model.php line 395 at Model->newBaseQueryBuilder() in Model.php line 1834 at Model->newQueryWithoutScopes() in Model.php line 1450 at Model->save() in ReviewController.php line 31 at ReviewController->index() at call_user_func_array(array(object(ReviewController), 'index'), array()) in Controller.php line 55 at Controller->callAction('index', array()) in ControllerDispatcher.php line 44 at ControllerDispatcher->dispatch(object(Route), object(ReviewController), 'index') in Route.php line 189 at Route->runController() in Route.php line 144 at Route->run(object(Request)) in Router.php line 653 at Router->Illuminate\Routing{closure}(object(Request)) in Pipeline.php line 53 at Pipeline->Illuminate\Routing{closure}(object(Request)) in SubstituteBindings.php line 41 at SubstituteBindings->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing{closure}(object(Request)) in Authenticate.php line 43 at Authenticate->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing{closure}(object(Request)) in VerifyCsrfToken.php line 65 at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing{closure}(object(Request)) in ShareErrorsFromSession.php line 49 at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing{closure}(object(Request)) in StartSession.php line 64 at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37 at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing{closure}(object(Request)) in EncryptCookies.php line 59 at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing{closure}(object(Request)) in Pipeline.php line 104 at Pipeline->then(object(Closure)) in Router.php line 655 at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 629 at Router->dispatchToRoute(object(Request)) in Router.php line 607 at Router->dispatch(object(Request)) in Kernel.php line 268 at Kernel->Illuminate\Foundation\Http{closure}(object(Request)) in Pipeline.php line 53 at Pipeline->Illuminate\Routing{closure}(object(Request)) in Debugbar.php line 51 at Debugbar->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing{closure}(object(Request)) in CheckForMaintenanceMode.php line 46 at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing{closure}(object(Request)) in Pipeline.php line 104 at Pipeline->then(object(Closure)) in Kernel.php line 150 at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 117 at Kernel->handle(object(Request)) in index.php line 53

I seem to have installed the driver correctly, but why is there still exist error

How can I solve it?

1
Just guessing, but your driver is x86 != x64 like your mongodb?Myonara
@Myonara, I use driver 32 bit, because my version xampp is 32 bit. It should be the same. My mongodb support 32 bit & 64 bit. Look at this : mongodb.com/download-center?jmp=nav#communitysamuel toh

1 Answers

0
votes

I think Laravel is looking for a database driver, not the PHP driver. Ensure that you've got a PHP package installed that will bridge a database connection for MongoDB and that it is configured correctly.