Created
April 10, 2012 12:57
-
-
Save gyndav/2351174 to your computer and use it in GitHub Desktop.
Simple Mongo PHP Driver extension installer for Travis CI. Works like a charm for other PECL extensions too.
This file contains 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
before_script: | |
- ./path/to/mongo-php-driver-installer.sh |
This file contains 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
#!/bin/bash | |
wget http://pecl.php.net/get/mongo-1.2.10.tgz | |
tar -xzf mongo-1.2.10.tgz | |
sh -c "cd mongo-1.2.10 && phpize && ./configure && sudo make install" | |
echo "extension=mongo.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` |
There's an easier way, see https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/pull/88/files
Update:
mongo is the old driver which is not compatible with PHP 7, you need to use new driver mongodb.
For php 7 there is recommended to use pecl install -f mongodb-stable
https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/blob/master/.travis.yml
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Credits goes to @bergie for grep/sed tricks.