Setting up the Mongo Driver for PHP is apparently something that's causing quite a few people some grief.
To setup the Mongo extension (mongo.so) for PHP, first log into your box via SSH and issue the following commands (these work for the default Ubuntu 12.04 installation)
sudo su
apt-get install php5-dev make
pecl install mongo
After these are installed, you'll need to edit the php.ini file.
nano /etc/php5/apache2/php.ini
Find the section that contains extensions. You can do this by pressing ctrl+w and searching for 'extension='
In this section add:
extension=mongo.so
If you also want to use the driver in CLI, then also edit the php.ini for CLI.
nano /etc/php5/cli/php.ini
Again, you'll want to add the extension, so search for it and add this line again:
extension=mongo.so
After that you'll want to restart your webserver (presumably Apache 2)
/etc/init.d/apache2 restart
You should now have the PHP Mongo classes available and be able to use Mongo from within your application.
