symfony propel:insert-sqlでエラー出たよ

symfony propel:insert-sqlでエラー

symfony propel:insert-sqlしたらエラーになった。


Execution of target "insert-sql" failed for the following reason: /usr/share/pear/symfony/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:275:1: [wrapped: could not find driver]
[phing] /usr/share/pear/symfony/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml:275:1: [wrapped: could not find driver]

Some problems occurred when executing the task:
build-propel.xml:275:1: [wrapped: could not find driver]
If the exception message is not clear enough, read the output of the task for more information

原因

ORMのpropel1.3ではphpにpdo-mysqlモジュールが必要とのこと。

解決

yumでpdo-mysqlをインストールした。
※php5.3をあつかうためremiで配布されているPHPを使用しています


sudo yum --enablerepo=remi install php-pdo

して、


sudo yum --enablerepo=remi install php-mysql

で解決。
途中コンフリクトエラー起こしたのでremi経由で入っていないphp-mysqlを一旦削除して
mysql入れ直した。

もう一度


$ symfony propel:insert-sql

This command will remove all data in your database.
Are you sure you want to proceed? (y/N)

y
>> schema converting "/xxx/config/schema.yml" to XML
>> schema putting /xxx/config/generated-schema.xml
>> propel Running "insert-sql" phing task
>> file- /xxx/config/generated-schema.xml

入ったー