I am trying to install cakePHP 3.0.0 with WT-NMP, but i got this message:
CakePHP is NOT able to connect to the database.
Database driver Cake\Database\Driver\Mysql cannot be used due to a missing PHP extension or unmet dependency
my php.ini has this:
extension = php_bz2.dll
extension = php_curl.dll
extension = php_gd2.dll
extension = php_imap.dll
extension = php_mbstring.dll
extension = php_exif.dll
extension = php_mysql.dll
extension = php_mysqli.dll
extension = php_pdo_mysql.dll
extension = php_pdo.dll
extension = php_soap.dll
extension = php_sockets.dll
extension = php_sqlite3.dll
extension = php_openssl.dll
extension = php_fileinfo.dll
extension = php_intl.dll
the app.php has this
'default' => [
'className' => 'Cake\Database\Connection',
'driver' => 'Cake\Database\Driver\Mysql',
'persistent' => false,
'host' => 'localhost',
/**
* CakePHP will use the default DB port based on the driver selected
* MySQL on MAMP uses port 8889, MAMP users will want to uncomment
* the following line and set the port accordingly
*/
'port' => '3306',
'username' => 'root',
'password' => '',
'database' => 'test',
'encoding' => 'utf8',
'timezone' => 'UTC',
'cacheMetadata' => true,
What am I missing? or this is cakePHP 3.0 bug? OR anything to do with WT-NMP. I have been stuck for whole day.
Try this:
For PHP 7.0
sudo apt-get install php7.0-mysql
For PHP 5:
sudo apt-get install php5-mysql
Solved this by luck!:
extension = php_intl.dll
extension = php_pdo_mysql.dll
intl.default_locale = en_utf8
intl.error_level = E_WARNING
Installing the modules for MySQL database connections solved it for me:
#Install the package
sudo apt-get install php5-mysql
#Restart Apache
sudo service apache2 restart
Source: http://guru4cakephp.blogspot.nl/2015/04/install-cakephp-3-on-ubuntu.html
Package details: https://packages.debian.org/sid/php5-mysql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With