Install PHP MongoDB (mongo) Driver on Linux, Mac OS X, Windows, UNIX, BSD - Comment Page: 1

PHP MongoDB (Mongo Database) Driver Installation on Linux, UNIX, BSD and Mac OS X MongoDB PHP driver is very simple install on Linux, UNIX, BSD and Mac OS X. You need just PEAR (PHP Extension and Application Repository) with PECL repository. Normally PHP development (dev) package and PHP Pear package installation from package management system is enough to get PEAR working. Also go-pear.php script can be used. Check that the PEAR and PECL are working with the following commands: ## Check PEAR ## pear version PEAR Version: 1.9.0 PHP Version: 5.3.1 Zend Engine Version: 2.3.0 Running on: Linux ## Check PECL ## pecl version PEAR Version: 1.9.0 PHP Version: 5.3.1 Zend...

15 comments on “Install PHP MongoDB (mongo) Driver on Linux, Mac OS X, Windows, UNIX, BSD - Comment Page: 1

    1. […] rest is here: Install PHP MongoDB (mongo) Driver on Linux, Mac OS X, Windows … Share and […]

      Reply
    2. […] original here: Install PHP MongoDB (mongo) Driver on Linux, Mac OS X, Windows … bsd, database, driver, driver-installation, mongo, mongo-database, php, unix, very-simple […]

      Reply
    3. […] >> Read the full details here: http://www.if-not-true-then-false.com/2010/install-php-mongodb-mongo-driver-on-linux-mac-os-x-window… […]

      Reply
    4. Don’t you have to add extension=php_mongo.dll in your php.ini file as well?

      Reply
      • I forgot to specify: for Windows install.

        Reply
        • Hi Adrian,

          Yes you are right. I update this guide soon. :)

          Reply
          • No problem. As an aside, I have an issue trying to run MongoDB as a service on Windows Server 2008 x64. I used the built in install: “mongod -install” It goes through successfully but it fails to start the service. It seems to get stuck in an infinite loop, starting, restarting. Have you come across this? I ended up having to right a start-up script that starts the mongo database manually. However, this requires a user to be logged in at all times, which will be an issue in a system crash/restart.

            Reply
    5. Another thing to remember is to check where your mongo.so file is. Do a simple:

      locate mongo.so

      and verify the location of your mongo.so file is the same as your php extension folder. I just got done pulling out my hair for about a week with that error.

      Reply
    6. Cheers mate. Saved me a lot of hassle with this

      Reply
    7. Hi
      The PECL command is not exist in my server
      and when i try install it with :
      sudo yum install pecl

      following error ocur:
      No package pecl available.

      Please help me about it

      Reply
      • Hi Omid,

        Try to install php-pear package:

        yum install php-pear
        
        Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close