title: HTTP Request 500 when I call mysqli_connect with PHP
body: <p>I want to use a database to store user data. I am running an Apache server with PHP and MySQL installed. When I try mysqli_connect, there is a HTTP 500 error. This is my code:</p>
  <pre><code>$con = mysqli_connect(&quot;localhost&quot;,&quot;root&quot;,&quot;password&quot;,&quot;database&quot;);
  mysqli_close($con);
  </code></pre>
  <p>I also checked the Apache log; here's what it said:</p>
  <blockquote>
  <p>[Time] [error] [client localhost] PHP Fatal error:  Call to undefined function mysqli_connect() in [Document Address] on line 78, referer: [URL]</p>
  </blockquote>
  <p>and</p>
  <pre><code>PHP Warning:  PHP Startup: Unable to load dynamic library 'ext/php_mysqli.dll' - The specified module could not be found.\r\n in Unknown on line 0
  </code></pre>
  <p>Also, <code>var_dump(function_exists('mysqli_connect'));</code> outputs <code>bool(false)</code>.</p>
  <p>I've uncommented <code>extension=php_mysqli.dll</code> in php.ini, checked the ext directory and there is a php_mysqli.dll file in it, checked other StackOverflow (and other) questions like this, but none of this answered it for me.</p>