0

I'm trying to install mongodb in a PHP environment. MongoDB itself is installed fine, I've run pecl install mongo, and added extension=mongo.so to php.ini; but my Laravel application complains that it can't find the class MongoClient. Checking phpinfo() reveals no mention of Mongo, suggesting that it isn't aware of the driver.

I noticed that all the instructions for installing mongo on Ubuntu mention apt-get install php5-dev. Is that a requirement for the mongodb php driver? At the moment the server is built with Chef and installs php with apache2::mod_php5. If php5-dev is required, can it be installed as an apache module?

1
  • 1
    It is a requirement by PECL to compile the driver, you just need the package, nothing else Commented Sep 10, 2013 at 10:14

1 Answer 1

0

Yeah you should as stated by docs here http://docs.mongodb.org/ecosystem/drivers/php/ Also if its unable to find mongo drivers ,Try debugging , check logs if it says something like mongo.so file is missing.

Don't forget to restart php and apache after saving php.ini

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.