kevinlinxp
12/31/2016 - 2:50 AM

PHP:Extensions:MongoDB

PHP:Extensions:MongoDB

curl -O http://pear.php.net/go-pear.phar
sudo php -d detect_unicode=0 go-pear.phar

# Type 1 and press return.
# Enter:
# /usr/local/pear
# Type 4 and press return.
# Enter:
# /usr/local/bin
# Press return

pear version

# Install php mongodb driver
sudo pecl install mongodb
# Use "sudo pecl install -f mongodb" to re-install if any php version issue
sudo echo "extension=mongodb.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`