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...
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 candidate
I am getting below error.
pdo_mysql extension is not installed
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 restart
Thanks,
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
try doing something like
extension=pdo.so
extension=pdo_mysql.so
in your php.ini
restart the webserver (e.g. with "sudo service apache2 restart")