Search code examples
phpwindowsmongodbwampserver

WAMPServer Fatal error: Class 'Mongo' not found


I'm using a Windows 8 64-bit machine and a 32-bit version of WAMPServer

I echoed phpinfo() and the extension has not been loaded - it does not appear

Does anyone know how to fix this?


Solution

  • Had the same issue. Below steps solved my issue.

    1. Make sure you have a 32 bit WAMP setup in place. Apparently, there are problems with 64 bit
    2. Get the lates php_mongo driver from https://github.com/mongodb/mongo-php-driver/downloads compatible with your version
    3. Rename it to php_mongo.dll and copy it to php extenstions folder. Default on windows is "ext"
    4. check phpinfo()
    5. Check for Loaded Configuration File variable. It gives you the path from where the php.ini file is read
    6. Add the line extension=php_mongo.dll to the php.ini file in the above path
    7. Restart your services