Re: Mongodb and Acquia Dev Stack

171 views
Skip to first unread message

Stephen Steneker

unread,
Sep 19, 2012, 11:43:42 PM9/19/12
to mongod...@googlegroups.com
I need some help installing mongodb to work with acquia dev stack. Can someone please help me or point me in the right direction.

Hi Will,

You should be able to follow the normal MongoDB instructions for your O/S, eg:
 - install a MongoDB server (http://www.mongodb.org/downloads)
 - install the MongoDB PHP driver (http://php.net/manual/en/mongo.installation.php)

What O/S are you using?

Cheers,
Stephen 

Will Kelly

unread,
Sep 20, 2012, 10:48:17 AM9/20/12
to mongod...@googlegroups.com
Hi Stephen,

Thanks for the response. I forgot to click the email me updates yesterday and missed your reply.

I am using OSX Mountain Lion. I have mongo and the mongo-php installed. I cannot get the dev stack to use it. I keep getting the drupal error that mongo-php is not installed. I have added the mongo.so to the php ini and restarted the stack but it still is failing to find it.

Will

Will Kelly

unread,
Sep 20, 2012, 10:49:06 AM9/20/12
to mongod...@googlegroups.com

Stephen Steneker

unread,
Sep 24, 2012, 12:21:56 AM9/24/12
to mongod...@googlegroups.com
Thanks for the response. I forgot to click the email me updates yesterday and missed your reply.

I am using OSX Mountain Lion. I have mongo and the mongo-php installed. I cannot get the dev stack to use it. I keep getting the drupal error that mongo-php is not installed. I have added the mongo.so to the php ini and restarted the stack but it still is failing to find it.

Hi Will,

Which version of PHP are you using .. and where did you get the mongo.so from (download, or build from source?).  The mongo.so needs to be compiled for the same PHP API version as your PHP major version (eg. PHP 5.2.x or 5.3.x .. or more specifically, the version returned by `php -i | grep "PHP API"`).

The Acquia Dev Desktop gives you a choice of PHP 5.2 or 5.3.  The normal mongo.so install is via `pecl`, but since that isn't included with the Acquia install I opted to try with a manual installation instead.

This is similar to the instructions at:

.. but I used explicit paths for the Acquia drupal directories:

Manual install:

# Download and unzip appropriate version from:

cd mongo-php-driver
/Applications/acquia-drupal/php5_3/bin/phpize
./configure
make
cp -p modules/mongo.so /Applications/acquia-drupal/php5_3/ext/
echo "extension=mongo.so" >> /Applications/acquia-drupal/php5_3/bin/php.ini

# Check that extension is recognized
/Applications/acquia-drupal/php5_3/bin/php -i | grep -C1 "MongoDB"

The php+grep output should show something like the following:

MongoDB Support => enabled
Version => 1.2.12

At this point you can restart the Acquia Drupal Stack via the control panel, and the `mongo` module should be good to use 

I've also put the version I compiled on my Github in case that helps .. hasn't been extensively tested but may help you get going sooner:

Cheers,
Stephen

Reply all
Reply to author
Forward
0 new messages