0

My machine is Windows 10, I am running PHP 7.3.12 on Xampp.

I have installed MongoDB extension and added it to php.ini as well.

Now when I run php -m|grep mongo, it shows MongoDB on the terminal.

When I run php -i on the terminal, it shows that MongoDB extension is enabled.

However, whenever I load phpinfo(), it does not show MongoDB extension there.

I installed jenssegers/mongodb for my laravel7 app.

But the app is showing the following error:

    "Class 'MongoDB\\Driver\\Manager' not found"

I have tried almost all the solutions that are suggested so far. Nothing worked.

What am I missing?

4
  • Nope. Tried all solutions suggested here. My confusion here is, I get mongodb extension enabled from terminal. But why my phpinfo is not displaying mongodb ext? There is no version mismatch issue for sure. Commented Oct 16, 2020 at 7:02
  • 2
    Please share more details. Which extension did you install? Mongo or MongoDB? Have you checked whether it is enabled in the php.ini which is used for your webserver? This is often a different one than that used for the shell Commented Oct 16, 2020 at 7:04
  • It looks like your CLI is using a different PHP configuration than your web server. It's a similar situation to stackoverflow.com/questions/42909397/… Commented Oct 16, 2020 at 7:07
  • Installed mongodb ext from here: pecl.php.net/package/mongodb. Both the shell and webserver are using the same php.ini. Commented Oct 16, 2020 at 7:07

1 Answer 1

1

After restarting the xampp several times. Phpinfo() still didn't show mongo ext enabled.

Restarting the OS solved it.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.