I have ran aptitude install php5-mysql
(and restarted MySQL/Apache 2), but I am still getting this error:
Fatal error: Call to undefined
If someone came here with the problem of docker php official images, type below command inside the docker container.
$ docker-php-ext-install mysql mysqli pdo pdo_mysql
For more information, please refer to the link above How to install more PHP extensions
section(But it's a bit difficult for me...).
Or this doc may help you.
https://docs.docker.com/samples/library/php/