0
votes

I am trying to install MongoDb on windows platform. I'm using PHP with WampServer.

But while executing the PHP program it gives the following error:

Fatal error: Class 'Mongo' not found in C:\wamp\www\test\index.php on line 19

So is there any way to check whether MongoDB is running with PHP or not ?

2

2 Answers

0
votes

Please check php loaded extensions using phpinfo() function whether mongoDB extension is loaded or not.

Do check these as well.

Fatal Error - 'Mongo' class not found

Fatal error: Class 'Mongo' not found in xampp

Add the following line to your php.ini file:

extension=php_mongo.dll

Docs Link: http://php.net/manual/en/mongo.installation.php

0
votes

Check this possible solution

Copy c:\wamp\bin\php\php-5.3.x\ext\

Edit c:\wamp\bin\apache\Apache2.2.xx\bin\php.ini and add the line where the extensions are loaded.

Why run WAMP on 32bit Windows 7 64bit?

The Mongo PHP driver does not have a 64bit binary win32, if you are running the 64bit version of WAMP, PHP will refuse to load the 32-bit version of php_mongo.dll.