Reputation: 310
I have a problem with mysqli and mysql. I'm using laradock on Mac, after the docker-compose up -d nginx mysql phpmyadmin
and try to open my PHP project on web, I have this error:
Fatal error: Uncaught Error: Call to undefined function `mysqli_connect()` in /var/www/f......
I read the php specs with phpinfo()
but Mysql seems to be set correctly.
Can anyone help me to solve it?
Upvotes: 1
Views: 944
Reputation: 310
I solve myself. On .env file of Laradock I enabled MYSQL
PHP_FPM_INSTALL_MYSQLI=true
After in terminal I launched this command
docker-compose build php-fpm
Upvotes: 2
Reputation: 6603
Install php5-mysql
apt-get install php5-mysql
And also make sure that you removed ; in php.ini file for below extension. This file can be found in etc/php5/apache2/php.ini
extension=php_mysqli.dll
Upvotes: 0