title: Class 'MongoClient' not found
body: <p>I'm trying to make this code run:</p>
  
  <pre><code>&lt;?php
  
  $m = new MongoClient("mongodb://54.72.237.242"); 
  $db = $m-&gt;tilbud; 
  
  ?&gt;
  </code></pre>
  
  <p>Everytime I got the same error:</p>
  
  <pre><code>Fatal error: Class 'MongoClient' not found in C:\xampp\htdocs\conexion.php
  </code></pre>
  
  <p>I've been reading about this problem the whole day but anything solves my issue (I guess it's something I'm doing wrong).</p>
  
  <p>I downloaded the php_mongo.dll, I copied it in xampp/php/ext and I added <code>extension=php_mongo.dll</code> in the php.ini archive.</p>
  
  <p>I've added 4 more dll's because I'm not sure which one I have to use:</p>
  
  <ul>
  <li><code>extension=php_mongo-1.5.4-5.5-vc11-nts</code></li>
  <li><code>extension=php_mongo-1.5.4-5.5-vc11</code></li>
  <li><code>extension=php_mongo-1.5.4-5.5-vc11-nts-x86_64</code></li>
  <li><code>extension=php_mongo-1.5.4-5.5-vc11-x86_64</code></li>
  </ul>
  
  <p>So now im getting 5 warnings instead of one. At the end I guess one of them will work and I'll delete the other 4.</p>
  
  <p>Things I tried and I'm sure they are ok:</p>
  
  <ul>
  <li>The extension_dir is pointing to the correct folder.</li>
  <li>The php.ini that I modified is the one that xammp loads.</li>
  <li>Phpinfo dosen't show anything about mongo.</li>
  </ul>
  
  <p>What more can I try ?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I tried </p>
  
  <blockquote>
    <p>echo extension_loaded("mongo") ? "loaded\n" : "not loaded\n";</p>
  </blockquote>
  
  <p>and it always says 'not loaded'.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Finally!
  The problem was the dll's name. It has to be 'php_mongo.dll' and I was trying to load the full name dll as I said at the begining of this post. So I changed the correct dll for me (<code>extension=php_mongo-1.5.4-5.5-vc11</code>) for <code>extension=php_mongo.dll</code> and voilà!</p>