Docker php:7.4.4-fpm-alpine Call to undefined function mysqli_init()

Viewed 2300

Mysqli functions do not work for me, example:

<?php
   $con = mysqli_init();
?>

Fatal error: Uncaught Error: Call to undefined function mysqli_init() in /var/www/html/public_html/test.php:2 Stack trace: #0 {main} thrown in /var/www/html/public_html/test.php on line 2

Everywhere it is recommended to execute this command inside the container:

docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql

I did it, but it does not help. What more can be done?

0 Answers
Related