I am using the MongoClient class to access a MongoDB.
[php]$mongo = new MongoClient($conset[‘host’] . “:” . $conset[‘port’],$conset[‘host’]);[/php]
I get the fatal error Fatal error:
Class 'MongoClient' not found
I installed the Mongo client using pear’s
pecl install mongo
and then add
extension=mongo.so
to the php.ini. I restart my apache server and check to see if mongo is installed using pecl search mongo
which returns mongo 1.5.5 (stable) 1.5.5 MongoDB database driver
However when I run the same php script it still returns the Fatal error. Why is this happening and how do I fix it?
I just called my VPS host (OVH) and they verified that they do not block any scripts or php extensions.