Installing the mongo extension php

apps

#1

Hi guys

I have a regular hosting account with dreamhost and I want to install the mongo extension for php so I can connect to a mongo database.

Any help would be much appreciated.

I dont have root access but am competent enough with the CLI.

I tried running pecl install mongo, I got a fatal error dude to memory limit being exceded, however the php.net site instructs that 32M should be sufficient and the servers memory_limit is set to 90M so something must be going wrong.

Cheers
Luke


#2

I used the last variant of the install script from the PHP custom install page on the wiki, and had to update a couple of old sourceforge URLs, php’s URL and a a version or two, but it managed to get things rolling, and adding this:

#now we install the mongo extension
git clone git://github.com/mongodb/mongo-php-driver.git
cd mongo-php-driver
./configure --with-php-config=${INSTALLDIR}/bin/php-config
make
make install
cd …

got me going… then I just had to link the resulting mongo.so in php’s .ini