Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I added the mongo.so extension to /etc/php5/apache2/php.ini and it is loading perfectly in php info.

But it does not work with /etc/php5/cli/php.ini.

When I try to run composer for adding mongodb lib it gives this error:

mongodb/mongodb 1.0.0 requires ext-mongodb ^1.1.0 -> the requested PHP extension mongodb is missing from your system.

Do anyone know what is the problem?

share|improve this question

mongo.so is the legacy driver but you need the new one https://pecl.php.net/package/mongodb and it should be installed like described here http://mongodb.github.io/mongo-php-driver/#installation

You need at least these packages for building php5 php-pear php5-dev openssl pkg-config libpcre3-dev

share|improve this answer

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.