Install/Upgrade a PHP Module/Driver

Upgrading php Mongodb module from 1.4.2 to 1.4.5

Download the Tar Ball

$ tar zxvf mongodb-mongodb-php-driver-.tar.gz
$ cd mongodb-mongodb-php-driver-
$ phpize
$ ./configure
$ make all
$ sudo make install

Make the following changes to php.ini:
Make sure the extension_dir variable is pointing to the directory containing mongo.so. The build will display where it is installing the PHP driver with output that looks something like:

Installing ‘/usr/lib/php/extensions/no-debug-non-zts-20060613/mongo.so’
Make sure that it is the same as the PHP extension directory by runnning:

    $ php -i | grep extension_dir
      extension_dir => /usr/lib/php/extensions/no-debug-non-zts-20060613 =>
                       /usr/lib/php/extensions/no-debug-non-zts-20060613

If it’s not, change the extension_dir in php.ini or move mongo.so.
To load the extension on PHP startup, add a line:

 extension=mongo.so 

Verify:

php -i | grep MongoDB -A 1
MongoDB Support => enabled
Version => 1.4.5
 
Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s