2

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
kelvinelove
  • 1,619
shyam
  • 131
  • 1
  • 1
  • 4

4 Answers4

3

sudo apt-get install php-pdo-mysql

Ara
  • 31
  • 2
1

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,

shyam
  • 131
  • 1
  • 1
  • 4
0

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
0

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")

Vichu
  • 101