compile & enabled php5 mongodb driver (ubuntu server)

check php driver mongo db

$ php --re mongo

install php-dev – to get phpize

 $ sudo apt-get install php5-dev

get source driver from

compile from source

$ tar zxvf mongodb-mongodb-php-driver-<commit_id>.tar.gz
$ cd mongodb-mongodb-php-driver-<commit_id>
$ phpize
$ ./configure
$ make all
$ sudo make install
Installing shared extensions:     /usr/lib/php5/20090626/

add to load ini php.ini

$ sudo nano /etc/php5/apache2/conf.d/

input this line

; configuration for mongodb

restart apache

$ sudo service apache2 restart

check at php_info()


Published by


just to remember what i had known :)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s