Working with Ubuntu 12.04 here, nginx and php5-fpm
I had mongo working well on php 5.3, then I added the ondrej/php5 ppa and updated to php5.4. It kept GD and CURL extensions, but not mongo. I re-added the line to the php.ini file, and nothing. Then I enabled startup errors and got this:
PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/mongo.so' - /usr/lib/php5/20100525/mongo.so: cannot open shared object file: No such file or directory
So, wild guess, I did find -name 'mongo.so'
and moved the file from 20090626/ to 20100525/ ...which resulted in this error:
PHP Startup: mongo: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
I then did pecl uninstall mongo
and pecl install mongo
- which created the new mongo.so file right back in 20090626/
I'm kinda new to all this so hopefully this is a blind easy mistake to fix! I just need to get mongo back up and running.