0

I am working on a project that consist of raw database to be made available while making project live on remote server. I have my linux server on which i did installation by following this link

I installed apache2 & php with above link

Then i installed mongodb by following this link

here when i installed, it gave me following output

root@GoTutor:~# sudo apt-get install mongodb-org
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mongodb-org

So i installed mongodb with this command:

sudo apt-get install mongodb

Now i am running script on it whose starting segment is as follows:

$m = new MongoClient();
echo "Connection to database successfully";

here it has showed me following error:

PHP Fatal error:  Class 'MongoClient' not found in /root/createRawCities.php on line 3

What to do in this case? Thanks

Shaggie
  • 1,799
  • 7
  • 34
  • 63
  • Seems like you haven't installed the mongo php extension, read [this](http://stackoverflow.com/questions/24533938/class-mongoclient-not-found) on how to install it – Kostis Mar 05 '16 at 10:40
  • are you talking about remote server linux where i have deployed my project & not on localhost? – Shaggie Mar 05 '16 at 10:44
  • Wherever if fails i guess :-) – Kostis Mar 05 '16 at 10:48
  • as per the mongodb documentation u no need to install drivers on server manually as mongodb do so itself. – Shaggie Mar 05 '16 at 11:14

0 Answers0