由于缺少PHP扩展,CakePHP 3无法连接到数据库 [英] CakePHP 3 is NOT able to connect to the database due to a missing PHP extension
本文介绍了由于缺少PHP扩展,CakePHP 3无法连接到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用WT-NMP安装cakePHP 3.0.0,但我收到了以下消息:
I am trying to install cakePHP 3.0.0 with WT-NMP, but i got this message:
CakePHP无法连接到数据库.
CakePHP is NOT able to connect to the database.
由于以下原因,无法使用数据库驱动程序Cake \ Database \ Driver \ Mysql 缺少PHP扩展名或未满足的依赖项
Database driver Cake\Database\Driver\Mysql cannot be used due to a missing PHP extension or unmet dependency
我的php.ini文件具有以下内容:
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
app.php拥有此
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,
我想念什么?还是这是cakePHP 3.0错误?或与WT-NMP有关. 我整天都被困住了.
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.
推荐答案
通过运气解决了这个问题!:
Solved this by luck!:
extension = php_intl.dll
extension = php_pdo_mysql.dll
intl.default_locale = en_utf8
intl.error_level = E_WARNING
这篇关于由于缺少PHP扩展,CakePHP 3无法连接到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文