title: PHP: mysqli extension doesn't load
body: <p>I try to use MySQL with PHP and I have this error:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in 'file_name Stack trace: #0 {main} thrown in 'file_name'`</p>
  </blockquote>
  
  <p>When doing <code>print_r( get_defined_functions())</code>, I see that the MySQLi extension isn't there, but it is "loaded" in the <code>php.ini</code> file (I mean this is not in a commentary).</p>
  
  <p>I specify that the PHP directory is in the PATH (I'm under windows) and MySQL, PHP and Apache are on my C: disk.</p>
  
  <p>I don't know where is the problem, this is probably a small thing but I can't see which one so. </p>
  
  <p>My versions are: </p>
  
  <pre>
  Apache 2.4.47
  PHP 7.1.7
  MySQL 5.7
  Windows 7
  </pre>
  
  <p>PS : <code>php_mysqli.dll</code> do only 97k. I don't know if it's normal.</p>
  
  <p>HOW I SOLVED THIS : I have just added <code>extension_dir="path_to_php\ext"</code> under the lines who load extentions, in the php.ini file. This line is used to indicate where are the extentions in your hard disk. Don't forget to restart your server, it will reload the php.ini file.</p>