I had PHP 5.2 with MongoDB installed on Debian Lenny x64 and everything was fine.
After upgrading PHP to 5.3 (dotdeb), I cannot get MongoDB to work, I always get an error
Fatal error: Class 'Mongo' not found (...)
Everything else works fine, all modules work by default.
My php.ini:
extension_dir = "/usr/lib/php5/20090626" extension=mongo.so
Mongo.so is in the same place as above. But when I run php -m in the console to check the loaded modules, "mongo" is not displayed there.
I cannot use dl('mongo.so') to load a module at runtime because this function was deprecated in PHP 5.3.
Maybe I need to somehow recompile the mongo, I just don’t know how to do this, because I am not very good at * nix commands.
Thanks for your help!
UPDATE It might also be worth saying that before my mongo.so was in /usr/lib/php5/20060613 and I manually copied it to "/usr/lib/php5/20090626" because it seems like after updates of my php all modules are there.
source share