MongoDB and PHP

vps

#1

I’m trying to tinker around with MongoDB and haven’t been able to access it through PHP. I’ve enabled MongoDB through the DH panel, and can access the shell via SSH, but when I try to do the following with PHP I get an error saying “Class MongoClient undefined.”

<?php $m = new MongoClient(); ?>

Did I miss something? Any tips would be appreciated.


#2

I figured it out! I didn’t have “mongo.so” listed as an extension in the phprc file!