Last active
April 2, 2025 17:02
-
-
Save imposibrus/d21cddf71a33395b8aa5 to your computer and use it in GitHub Desktop.
Install MongoDB PHP driver on Ubuntu 14.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install -y php-pear php5-dev | |
sudo pecl install mongo | |
sudo sh -c "echo 'extension=mongo.so' > /etc/php5/mods-available/mongo.ini" | |
sudo ln -s /etc/php5/mods-available/mongo.ini /etc/php5/apache2/conf.d/mongo.ini | |
sudo service apache2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is good to enable mongo extension for PHP CLI mode as done for Apache.
sudo sh -c "echo 'extension=mongo.so' > /etc/php5/cli/mongo.ini"