Installing the Mongo PHP Extensions (php_mongo.dll)

18,392

Solution 1

Just copying the DLL file to the correct directory is not enough. You also need to add the following line to your php.ini file before the MongoDB extension is available:

extension=php_mongo.dll

After that restart Apache and MongoDB should show up as an available extension in phpinfo().

By the way, that is also mentioned on the official PHP website for installing the MongoDB driver: http://www.php.net/manual/en/mongodb.installation.windows.php

Solution 2

Should be extension="php_mongodb.dll instead of extension="php_mongo.dll as it is the name of the file you copied.

Share:
18,392
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    Environment in local system

    MAMP 3.2.2
    PHP 5.6.24
    Webserver Apache
    

    Mongodb for caching is installed successfully and found running in MongoDBservice.

    I Downloaded Mongodb drivers from https://pecl.php.net/package/mongodb (used thread safe versions PHP5.6 "php_mongodb.dll") selected php_mongo-1.1.8-5.6-ts-vc11-x64.zip, Made changes to php.ini as extension=php_mongo.dll

    I just copied and pasted .dll file in my C:\MAMP\bin\php\php5.6.24\ext So far good... After restarting my MAMP I cannot see mongo in phpinfo ---->This is my issue

    Any idea about this? Thank you