Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have mongo installed on the server and running, I can query the command line. PHP and Apache are running fine as well. The problem, however, is that mongo.so isn't in the php lib directory, and I can't find mongo.so to move it there. sudo find / -name mongo.so doesn't yield any results. I also can't really find anywhere to download it.

How should I proceed?

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

So, you need the PHP bit to connect to mongo.

You can use PECL to install it by running something like pecl install mongo.

You can also install it more manually by going to http://pecl.php.net/package/mongo

I don't believe Ubuntu (at least 10.04) has a PHP-mongo package, at least not according to aptitude search mongo.

Update:

As noted below, the OP needed the build-essential package, which will include things like make, gcc, etc. https://help.ubuntu.com/community/CompilingEasyHowTo

share|improve this answer
    
Turns out I had to install PECL, GCC and MAKE... that was my problem. and sudo apt-get install PECL isn't how you do that, apparently! –  kavisiegel Mar 6 '12 at 20:47
    
Yeah, PECL is just going to download the source for you and compile it. To compile it, you're going to need gcc, make, etc. –  cjc Mar 6 '12 at 21:04
add comment

Try reading this http://quadloops.com/how-to-setup-a-php-and-mongodb-development-environment-in-ubuntu-12-04/ guide to setup PHP and MongoDB developement environment. This one is for Ubuntu, but it think it should work with others too.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.