-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class 'MongoDB\Driver\Manager' not found #1358
Comments
Are you adding the ServiceProvider? Update your mongodb driver |
For me the same problem, but in migration and seeding it works but not in the website |
Duplicate of #1163 |
iI have the same problem, please help me one |
@doliskani do you have the mongodb extension installed and activated? |
Yes I did. |
Please share the output of |
C:\wamp64\bin\php>php -m [Zend Modules] I don't understand why it does't display Mongo at here but it is shown in the output of the phpinfo() |
None of the above links resolved my issue |
I can store the information using the command line, but I can't in Laravel, where is the problem? |
Please install without the --ignore-platform-reqs, please share the output of command |
I'm really helpless, why this error does not fix |
You need to update your mongodb extension. |
hi all, i was trial and error how to find solutions Class 'MongoDB\Driver\Manager' not found First problem : i cant do composer install/update, since use $ git clone https://github.com/mongodb/mongo-php-driver.git If you have problem with configure, just do : then i check file mongodb.so in i check php.ini too (php/pph7.1.19/conf), make sure that extension. But I remember I was wrote this line before (another research) :
Second problem, Im going to try run The research (mac) :
OK..I wrote a line extension for mongo too, like before. Back to terminal and check i research by delete temp file (backup before) then do some last step, but not working, so i restore file and recheck Final so…I get this file, to add line Result To make sure mongodb already in machine what I expected for my app (Laravel 5.6 + postgre + mongodb for logging).
btw..thanks for all, for comments. Im a amateur for this case, im newbie for Mac, this first half-year using Mac-OS. sorry late, |
Laravel Version: 5.7 After first installing Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_ERROR) Symfony\Component\Debug\Exception\FatalThrowableError vendor/laravel/framework/src/Illuminate/Database/Connection.php any solution? |
I'm facing the same issue and this doesn't have any direct relation with your PHP Mongo DB driver, I'm running the project inside a docker self container environment and the issue still happening (I'm running the composer inside the same Docker context). I'm using PHP 7.4 with Laravel's latest version. When I downgraded to PHP 7.1 it worked fine. I guess the issue there's a relation with PHP version itself than with MongoDB, anyway, this does not only happen when I do composer require it's happening too when I tried to do composer update. This issue is very common with this library and usually, my solutions are going to the core of the library and change everything by myself and sometimes when I run the composer <require/update/remove> --ignore-platform-reqs works. The issue in my case is on the file vendor/mongodb/mongodb/src/Client.php line 107 on the constructor function, code bellow:
For some reason, the Driver Manager is gone (and I tried to search and the driver is really gonne, why removed?!). Anyway, for now, the only solution it seems like we have to downgrade to 3.5 and wait for the fix. |
@Messhias show example for docker-compose configuration and steps for reproducing problem |
Do you mean you need the Dockerfile configuration? |
Yes and versions for php mongo driver and extension |
@Smolevich In fact, I strongly suggest use this Dockerfile in future versions of the library but this is the one that I use when the library broken or some unfixed issue happens to debug by myself and change the core.
|
Any updates about this issue? |
@Smolevich let's continue this discussion by slack and let's hope to @jenssegers accept the propose. |
Hello, This has nothing to do with this library, it's an issue with missing/incorrect settings for mongodb extension. Thanks. |
If you get this error, even after you installed the Mongodb driver for php, just install mongodb using composer.
After that this will solve your problem. |
I had the same issue. I have solved it changing the permissions on the library mongodb.so, because after the installation the file had 644 and I changed to 755 and it worked. |
I had the same issue and the following two commands solved my issue
|
i am have a same issue
|
If your using valet, restart it after installation. |
Class "MongoDB\Driver\Manager" not found this error new laravel Version please help me |
did you fixed this problem! |
yes
…On Tue, Apr 2, 2024 at 5:56 AM latifaChakir ***@***.***> wrote:
did you fixed this problem!
—
Reply to this email directly, view it on GitHub
<#1358 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A75FUI2J2IWTFPZ3X7DI5MLY3H3JTAVCNFSM4ECQP7O2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBTGA4DINBXGI2Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hello,
I'm using Php7.1, Laravel 5.5, and Mongo 3.4.10 as Dockers.
In the
.../vendor/mongodb/mongodb/src/Client.php
file, the corresponding FatalThrowableErrorClass 'MongoDB\Driver\Manager' not found
appears on line 83.In the Model
I used the code,
In the Controller,
I used the code.
The database.php file contains
I put this code in it.
I've been looking for the same error since yesterday, but it's still the same.
Help is urgently needed.
The text was updated successfully, but these errors were encountered: