title: Access a remote mongodb with wordpress php
body: <p>I'm trying to access a mongodb within a plugin in wordpress. I have no trouble connecting to the db through robomongo but when I use the following code in a php file in a plugin:</p>
  
  <pre><code>$db = new Mongo('mongodb://host:port', array(
      'username' =&gt; 'user',
      'password' =&gt; 'pass'
  ));
  </code></pre>
  
  <p>or even just</p>
  
  <pre><code>$db = new Mongo();
  </code></pre>
  
  <p>The page won't even load. Thanks</p>
  
  <p>EDIT:
  Here is the error that wp outputted</p>
  
  <p>Class 'Mongo' not found in <b>pathing/wp-content/plugins/nameofplugin/nameofplugin.php</b> on line 24</p>
  
  <p>I installed mongodb with homebrew as well as php 5.6 driver for mongodb</p>