Not able to enable pdo_mysql extension or not able to install
I am using Ubuntu 16.04.3 LTS , Using PHP version 5.6 i have required 5.6 version only not required php latest version
I tried to install or tried to enable but not working:
sudo apt-get install php5-gd php5-mysql
E: Package 'php5-mysql' has no installation candidateI am getting below error.
pdo_mysql extension is not installed 1 4 Answers
sudo apt-get install php-pdo-mysql
Thanks for your help, i have resolved issue.
I have executed below commands in terminal.
sudo a2dismod php7.0
sudo a2enmod php5.6
sudo apt-get install php5.6-mysql
sudo service apache2 restartThanks,
As of version 16.04, Ubuntu comes with php7 by default. You need to install php5 repository. This might help:
#sudo add-apt-repository ppa:ondrej/php 6 try doing something like
extension=pdo.so
extension=pdo_mysql.soin your php.ini
restart the webserver (e.g. with "sudo service apache2 restart")