CakePHP 2.6 and PHP 5.6.40 (Upgraded from 5.3.17) Error Mysql "Selected driver is not enabled"

Hi. I have an application running CakePHP 2.6 with PHP 5.3.17. I recently upgraded my PHP version to PHP 5.6.40. Unfortunately, the site cannot be reached after the upgrade.

Here’s the screenshot from the error.log

Error: [MissingConnectionException] Database connection "Mysql" is missing, or could not be created.
Exception Attributes: array (
  'class' => 'Mysql',
  'message' => 'Selected driver is not enabled',
  'enabled' => false,

Just as a guess, I’d say that maybe you haven’t enabled the MySQL driver in the new PHP?

I already enabled it in the php.ini, do I need to install php extensions like php5.6-mysql etc.?

What does the php.ini line look like? Assuming that you restarted your web server after that? Have you confirmed (with phpinfo for example) that it’s enabled (maybe it’s using a different php.ini file than you think it is?) when running in a web page context?

Seems like installing all the required php extensions solved the issue.

php5.6-cli php5.6-json php5.6-pdo php5.6-mysql php5.6-zip php5.6-gd php5.6-mbstring php5.6-curl php5.6-xml php5.6-pear php5.6-bcmath php5.6-intl libapache2-mod-php5.6