could not find driver
$pdo = new Phalcon\Db\Adapter\Pdo\Mysql($config);
Exception : could not find driver
[internal function]: PDO->__construct('mysql:host=127....', .....
My Environment:
CentOS 7 , php7 , mysql 5.7
phalcon installed step as follow:
git clone --depth=1 git://github.com/phalcon/cphalcon.git
cd cphalcon/build
sudo ./install
my php7 extension as follow:
php -m
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
exif
fileinfo
filter
ftp
gettext
gmp
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_dblib
pdo_mysql
pdo_sqlite
phalcon
Phar
readline
redis
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
xml
zip
zlib
[Zend Modules]
Question
I can use native PHP to do...It's correct !
<?php
$dsn = "mysql:host=127.0.0.1;dbname=tome_base";
try {
$pdo= new PDO($dsn,"tome_base_w","l6_2GHs_01jssRfy_23iJsd",[
constant('PDO::MYSQL_ATTR_USE_BUFFERED_QUERY') => true,
constant('PDO::ATTR_PERSISTENT') => true,
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES'utf8';",
]);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, FALSE);
$pdo->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, FALSE);
$rv = $pdo->query("select * from user", PDO::FETCH_OBJ);
$d = $rv->fetch();
var_dump($d);
} catch (\Exception $ex) {
echo $ex->getMessage();
}
but In the Phalcon, It has exception : could not find driver...
Help!!! Thk~~