我在symfony doctrine create table中面临一个问题
TTENTION: This operation should not be executed in a production environment.
Creating database schema...
[Doctrine\ORM\Tools\ToolsException]
Schema-Tool failed with Error 'could not find driver' while executing DDL: CREATE TABLE Card (id INT AUTO_INCREMENT NOT NULL, encrypted_id VARCHAR(255) DEFAULT NULL, Type VARCHAR(10) NOT NULL, Nb_s
can INT NOT NULL, Id_user INT DEFAULT NULL, INDEX IDX_B62637EDC90EF3D7 (Id_user), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB
[PDOException]
could not find driver
doctrine:schema:create [--dump-sql] [--em[="..."]]
我已经安装了pdo模块。
php -m
[PHP Modules]
bcmath
bz2
Core
ctype
date
dom
ereg
fileinfo
filter
hash
intl
json
libxml
mhash
mysqlnd
openssl
pcre
PDO
Phar
readline
Reflection
session
SimpleXML
SPL
standard
tokenizer
xml
xmlreader
xmlwriter
zlib
[Zend Modules]
parameters.yml
parameters:
database_driver: pdo_mysql
database_host: 127.0.0.1
database_port: ~
database_name: sofid
database_user: sofid
database_password: sofid
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: ~
mailer_password: ~
locale: en
答案 0 :(得分:1)
你需要安装php5-mysql
在ubuntu中:sudo apt-get install php5-mysql