Jump to content

Recommended Posts

Hi

 

I recently installed Propel using PEAR.

 

I created a folder("Project") and and put my schema.xml, build.properties and runtime-conf.xml files in the folder.

 

Running the following command then created all the necessary classes, etc.

 

C:\Project> propel-gen

 

I deleted this folder and files and am trying to set it up in a new site im developing as follows:

 

C:\Site\DAO> propel-gen

 

I get the following error:

 

Execution of target "sql-template" failed for the following reason: C:\PHP\data\propel_generator\build-propel.xml:198:1:
No schema files were found (matching your schema fileset definition).
[phingcall] C:\PHP\data\propel_generator\build-propel.xml:198:1: No schema files were found (matching your schema filese
t definition).
Execution of target "sql" failed for the following reason: C:\PHP\data\propel_generator\build-propel.xml:182:22: Executi
on of the target buildfile failed. Aborting.
[phingcall] C:\PHP\data\propel_generator\build-propel.xml:182:22: Execution of the target buildfile failed. Aborting.
Execution of target "main" failed for the following reason: C:\PHP\data\propel_generator\build-propel.xml:92:22: Executi
on of the target buildfile failed. Aborting.
    [phing] C:\PHP\data\propel_generator\build-propel.xml:92:22: Execution of the target buildfile failed. Aborting.

 

build.properties:

# set the paths to the Propel installation, your project home and your
# build files
project.home = C:\Site\DAO
project.build = ${project.home}/build

# set some basic properties for the project and the database connection
propel.project = Site
propel.database = mysql
propel.targetPackage = 
propel.database.url = mysql://root:@localhost/Site
propel.mysql.tableType = InnoDB

# set the directories for the schema.xml and the runtime-conf.xml files 
# and the path to the template files that Propel uses
propel.schema.dir = ${project.build}
propel.conf.dir = ${project.build}
propel.templatePath = ${propel.home}/templates

# set the directories for the generated output, i.e. the data object classes, a
# PHP file with the configuration data and the SQL files
propel.output.dir = ${project.home}
propel.php.dir = ${propel.output.dir}/classes
propel.phpconf.dir = ${propel.output.dir}/config
propel.sql.dir = ${project.build}/sql

# set the name for the configuration file
propel.runtime.phpconf.file = propel-config.php

 

runtime-conf.xml

 

<?xml version="1.0" encoding="ISO-8859-1"?>

<config>
  <propel>
  <datasources default="site">
   <datasource id="site"> <!-- this ID must match <database name=""> in schema.xml -->
    <adapter>mysql</adapter> <!-- sqlite, mysql, myssql, oracle, or pgsql -->
    <connection>
     <dsn>mysql:host=localhost;dbname=bookstore</dsn> <!-- the PDO connection DSN for database -->
     <user>root</user>
     <password>password</password>
    </connection>
   </datasource>
  </datasources>
</propel>
</config>

 

Any help would be greatly appreciated.

I get the following error:

Link to comment
https://forums.phpfreaks.com/topic/177009-propel-building/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.