Uncaught Error Call to undefined function mysqli connect

0 votes

Hi Guys,

I have docker engine in my linux system. I am trying to launch php container in docker using docker-compose. But it shows me the below error.

Uncaught Error: Call to undefined function mysqli_connect
Apr 14, 2020 in Docker by akhtar
• 38,170 points
1,704 views

1 answer to this question.

0 votes

Hi@akhtar,

This error may occurred because “PHP mysqli plugin” is missing inside PHP’s Docker container. To install it, use the below given command inside PHP's container.

$ docker-php-ext-install mysqli  
$ docker-php-ext-enable mysqli

Hope this will help.

answered Apr 14, 2020 by MD
• 95,060 points
This is quite useful. Thanks.

Related Questions In Docker

0 votes
1 answer

Error “unable to resolve host docker”

This error occurs because its not a ...READ MORE

answered Jul 10, 2018 in Docker by Kalgi
• 2,680 points
2,517 views
0 votes
1 answer

Docker error cannot delete docker container, conflict: unable to remove repository reference

First, remove the container names $ sudo docker ...READ MORE

answered Jul 31, 2018 in Docker by Kalgi
• 52,290 points
2,447 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,100 points
1,039 views
0 votes
1 answer
0 votes
1 answer