0

I am trying to make use of mongodb in a LAMP setup in my machine. The tech specs I have been using are:

OS: Linux(Ubuntu-16.04LTS)
PHP Version: PHP 7.0.33-0ubuntu0.16.04.2
mongo version: Percona Server for MongoDB shell version v3.4.18-2.16
PHP Framework: CodeIgnitor-3.1.10

Following are the things I tried:

  1. I used this library to connect mongo database but did not work well.
  2. I used the code method as described in this thread.

Whenever I tried this file as library and configured to autoload the library then I encountered this issue:

Class 'MongoClient' not found.

Vickel
  • 7,879
  • 6
  • 35
  • 56
Krishna Chalise
  • 147
  • 1
  • 15
  • Can you share the exact code you've used? – Nico Haase Mar 20 '19 at 18:30
  • I have not been to a phase where I can start writing a controller as the setup provided in `the things I tried` section does not seem to work for me. I am looking for the proper setup. – Krishna Chalise Mar 20 '19 at 18:33
  • I'm just asking because you've shared an error message. There must be some code given to lead you to that message, and that message does not look like the setup already went wrong – Nico Haase Mar 20 '19 at 20:40
  • @NicoHaase Please find the updated question with the library file that I used and autoloaded. – Krishna Chalise Mar 21 '19 at 02:42
  • Please share your code here in text form. Try do reduce it to the minimum parts triggering your problem, and avoid using only links to provide such information – Nico Haase Mar 21 '19 at 05:56

0 Answers0