0

I am creating a REST API with Laravel 5.2 and I'm also using MongoDB with the jenssegers/mongodb library. I have a virtualhost for my application so I can go to the url eg: http://myapp.local.com and simulate how it would be on the real server and as I have some other Laravel projects on dev right now, it is more organised to have them this way.

The virtualhost is pointing to the public folder of my application and it's working correctly.

This project is just starting so everything is being built right now. In order to check the database I created a very simple PostsController just to see if the connection and the results were returned correctly. I added Route::resource('/posts', 'PostsController'); in my routes.php so I could start doing some tests of basic CRUD operations.

When I use php artisan serve and access this route with http://localhost:8000/posts the results are brought correctly but when I try to access via http://myapp.local.com/posts I get this error:

FatalErrorException in Client.php line 56:
Class 'MongoDB\Driver\Manager' not found

Any ideas why this is happening?

pgzm29
  • 160
  • 1
  • 13
  • Also having the same issue. Are you running on Mac, Windows or Linux? @shattered_skies29 have you tried this fix? https://stackoverflow.com/questions/35920568/class-mongodb-driver-manager-not-found – imbayago Jul 05 '16 at 08:53
  • I am running this on Mac. I also saw that post and tried something similar but not exactly that. Have you tried it? Have you had any luck with this issue? – pgzm29 Jul 05 '16 at 15:30
  • I'm running on Mac & haven't managed to get it working. Running on PHP7 and have extension-mongodb.so in php.ini. No luck. – imbayago Jul 05 '16 at 16:57
  • And are you having the exact same issue? If you serve your app with artisan does it work correctly? Because that's the weird thing :/ – pgzm29 Jul 05 '16 at 17:02
  • Running the app off localhost and that's the identical error i'm getting even on the same line number. – imbayago Jul 05 '16 at 17:09
  • any luck with this issue @imbayago? – pgzm29 Jul 19 '16 at 18:24
  • Haven't managed to get it working on localhost, but managed to get it working on a Digital Ocean cloud server. – imbayago Jul 20 '16 at 19:10

0 Answers0