title: PHP Startup: Unable to load dynamic library 'php_mongodb.dll'
body: <p>I'm trying to get Laravel MongoDB working in my local machine (Windows 10 home, x64) by following <a href="https://appdividend.com/2018/05/10/laravel-mongodb-crud-tutorial-with-example/" rel="nofollow noreferrer">this tutorial</a></p>
  
  <ol>
  <li>I have installed XAMPP 7.3.11 on <code>D:\xampp</code> succesfully and tested that the server can be reached (enter <code>localhost:80</code> on browser)</li>
  <li><p>I proceeded on extracting <code>php_mongodb.dll</code> I got from <a href="https://pecl.php.net/package/mongodb/1.6.0/windows" rel="nofollow noreferrer">pecl</a>(mongodb 1.6.0 for Windows, 7.3 Non Thread Safe, x64 ) on <code>D:\xampp\php\ext</code> and add the line <code>extension=php_mongodb.dll</code> on the file <code>D:\xampp\php\php.ini</code></p></li>
  <li><p>After selecting 'the command-line PHP you want to use' to <code>D:\xampp\php\php.exe</code>, the setup then gave the following output:</p>
  
  <blockquote>
    <p>The PHP exe file you specified did not run correctly:
    D:\xampp\php\php.exe</p>
    
    <p>The php.ini used by your command-line PHP is: D:\xampp\php\php.ini</p>
    
    <p>A setting in your php.ini could be causing the problem: Either the
    'extension_dir' value is incorrect or the dll does not exist.</p>
    
    <p>Program Output: PHP Warning:  PHP Startup: Unable to load dynamic
    library 'php_mongodb.dll' (tried: D:\xampp\php\ext\php_mongodb.dll
    (The specified module could not be found.),
    D:\xampp\php\ext\php_php_mongodb.dll.dll (The specified module could
    not be found.)) in Unknown on line 0</p>
  </blockquote></li>
  </ol>
  
  <p>Commenting out the line <code>extension=php_mongodb.dll</code> will execute <code>D:\xampp\php\php.exe</code> without any warning. But I would need php to be aware of <code>php_mongodb.dll</code> during composer installation, right?</p>
  
  <p>So how to resolve this problem? The file definitely exists in the folder, and the required modification on <code>php.ini</code> has been provided. 
  I have already looked around and some people mentioning the path in <code>extension_dir</code> must be written in full path. But I have already checked that the line on my <code>php.ini</code> is <code>extension_dir="D:\xampp\php\ext"</code></p>