8

I'm using Ubuntu Xampp (Lampp) and currently on MongoDB 1.5.3 driver.

I need to downgrade to 1.4.5, but when re-installed the downgraded driver, it does not change in phpinfo(). Yes, I have restarted Apache.

So, how do I uninstall the current one and install the downgraded version?

Wahyu Kristianto
  • 8,719
  • 6
  • 43
  • 68
AFwcxx
  • 467
  • 1
  • 4
  • 15

1 Answers1

14

Update: 2018-06-20:

PECL package mongo is now deprecated, you should use mongodb package instead:

sudo pecl install -f mongodb-1.4.4

Original answer

You can upgrade to a specific version of a driver by using pecl:

sudo pecl install -f mongo-1.4.5

If you get a pecl: command not found error you will need to install PEAR package:

sudo apt-get update && sudo apt-get install php-pear

You can use this command to check that you have the correct version installed:

sudo pecl info mongo

Or you can check php configuration directly with:

php -i | grep -A 1 MongoDB
Christian P
  • 12,032
  • 6
  • 60
  • 71