MongoDB: Fatal error: Class 'MongoClient' not found
<p>When executing the following PHP code:</p>

<pre><code>$m = new MongoClient("mongodb://localhost:27017");
</code></pre>

<p>I get the following error: </p>

<blockquote>
  <p>Fatal error: Class 'MongoClient' not found in (...)</p>
</blockquote>

<p>MongoDB extension seems properly installed (I copied <code>php_mongodb.dll</code> to ext folder and updated <code>php.ini</code>).</p>

<p>PHP seems to confirm that the extension is running properly as the following code confirms it is loaded: </p>

<pre><code>echo extension_loaded("mongodb") ? "loaded\n" : "not loaded\n";
</code></pre>

<p>Also, <code>phpinfo()</code> shows that mongodb extension has been loaded.</p>

<hr>

<p><strong>UPDATE</strong>: my problem is still not solved.</p>

<p><code>phpinfo()</code> clearly shows that the driver is loaded:</p>

<p><a href="https://i.stack.imgur.com/ep76F.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/ep76F.jpg" alt="enter image description here"></a></p>

<p>But I am still receiving the same fatal error.</p>