title: Docker- Call to undefined function mysqli_connect()
body: <p>I am getting below error when trying to access from browser &quot;http://192.168.x.x:9091/testcon.php&quot;</p>
  <pre><code>Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /var/www/html/testcon.php
  </code></pre>
  <p>Contents of testcon.php is like below,</p>
  <pre><code>&lt;?php
  $servername = &quot;db&quot;;
  $username = &quot;root&quot;;
  $password = &quot;pass1234&quot;;
  $dbname='server';
  $conn = mysqli_connect($servername, $username, $password, $dbname);
  
  // Check connection
  if ($conn-&gt;connect_error) {
   die(&quot;Connection failed: &quot; . $conn-&gt;connect_error);
  }
  echo &quot;Connected successfully&quot;;
  ?&gt;
  </code></pre>
  <p>But the same is working from inside container. If i run like &quot;php testcon.php&quot; it will work</p>
  <pre><code>root@e951040c5265:/var/www/html# php testcon.php
  Connected successfullyroot@e951040c5265:/var/www/html#
  </code></pre>
  <p>I have also edited /usr/local/etc/php/php.ini-development and uncommented line &quot;extension=mysqli&quot;, Still facing same issue</p>
  <p>docker images used are below,</p>
  <p>mysql:8.0.1</p>
  <p>php:7.4.7-apache</p>
  <p>phpmyadmin/phpmyadmin</p>
  <p>TIA</p>