Reputation: 21
Just started working with php and propel.
I am using Uniform Server (wamp server) and have db in mysql.
I am getting following error while running 'propel-gen test reverse'
propel > reverse:
[echo] +-----------------------------------------------+
[echo] | |
[echo] | Generating XML from PDO connection ! |
[echo] | |
[echo] +-----------------------------------------------+
[propel-schema-reverse] There was an error building XML from metadata: could not find driver
BUILD FINISHED
even error is not so much elaborated.
here is my build.properties
propel.home = .
propel.project = test
propel.targetPackage = lib.model
propel.packageObjectModel = true
propel.database = mysql
propel.database.driver = mysql
propel.database.url = mysql:host=localhost;dbname=db_test
propel.database.user = myuser
propel.database.password = mypwd
please tell me how to resolve this problem and view description of the error.
thanks in advance.
Upvotes: 2
Views: 2441
Reputation: 7978
You have to correct the url or dns. For example, in my database.yml (I am using Propel under Symfony) you have to put someting like this:
all:
propel:
class: sfPropelDatabase
param:
classname: PropelPDO
**dsn: 'mysql:host=localhost;dbname=sfjob'**
username: root
password: miyoko
encoding: utf8
persistent: true
pooling: true
The important thing is the url: should be mysql and not msql
Upvotes: 1
Reputation: 11
You should enable add line below to php-cli.ini to solve this problem
extension=php_pdo_mysql.dll
Upvotes: 1