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...
[…] rest is here: Install PHP MongoDB (mongo) Driver on Linux, Mac OS X, Windows … Share and […]
[…] Database Driver http://www.if-not-true-then-false.com/2010/03/install-php-mongodb-mongo-driver-on-linux-mac-os-x-win… # pecl search mongo Retrieving data…0%Matched packages, channel pecl.php.net: […]
[…] 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 […]
Thanks Dude!
[…] >> 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… […]
Don’t you have to add extension=php_mongo.dll in your php.ini file as well?
I forgot to specify: for Windows install.
Hi Adrian,
Yes you are right. I update this guide soon. :)
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.
Sorry, but I have not tried MongoDB server on Windows. Please check if following guides helps:
MongoDB Quickstart Windows
MongoDB Windows Service
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.
Cheers mate. Saved me a lot of hassle with this
More MongoDB PHP drivers for Windows can be downloaded here:
http://pecl.php.net/package/mongo/1.6.1/windows
And here:
https://s3.amazonaws.com/drivers.mongodb.org/php/index.html
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
Hi Omid,
Try to install php-pear package: