0
votes

I can't get the propel script running on my system.

My build.properties looks like this:

propel.project = test

# The Propel driver to use for generating SQL, etc.
propel.database = pgsql

# This must be a PDO DSN
propel.database.url = pgsql:host=localhost;port=5432;dbname=test
propel.database.user = user
propel.database.password = password

I get the following error when I run propel-gen . reverse:

[propel-schema-reverse] There was an error building XML from metadata: /home/user/web/dev/vendor/propel/generator/build-propel.xml:296:1: could not find driver

pdo_pgsql is enabled (there are several applications running it succesfully); but in my phpinfo there seems to be a wrong version stated:

PostgreSQL(libpq) Version 8.4.13

I'm running PostgreSQL 9.1. I think this causes the error but I have no idea why the versions are different. I have installed first PostGreSQL and then php5-fpm etc. via apt-get.

Using Php 5.3.5 on Ubuntu 11.04. Can somebody help?

1
If phpinfo says you're using 8.4.13 then my guess is you have two versions installed. Not sure how to correct that, but Propel should always use the version phpinfo recognizes. - Jordan Kasper
@jakerella how could i find that out? In /etc/postgresql there is just one directory called 9.1, no other. My phppgsql also shows this version. I just don't know from where phpinfo takes this information :/ - 32bitfloat
Really not sure. hopefully someone smarter than me can help! ;) - Jordan Kasper

1 Answers

0
votes

Remove all empty spaces and newlines in between the xml tags in the buildtime-conf.xml. That worked for me.

My file looked like this after using the runtime-conf.xml as a template for the buildtime-conf.xml

...
            <adapter>
mysql
            </adapter>

...

Now it looks like that and it works

...
            <adapter>mysql</adapter>

...