This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » legacy support » symfony 1.2 » propel+oracle+build problem
propel+oracle+build problem [message #69279] Tue, 06 January 2009 10:25 Go to next message
g0tan  is currently offline g0tan
Messages: 4
Registered: October 2007
Junior Member
Hello everyone !
I try to generate my db model from oracle, and I have this error msg from propel generator:
Quote:


[propel-schema-reverse] There was an error building XML from metadata: Error importing propel/engine/platform/OciPlatform.php


I have installed php extensions (PDO, PDO_OCI, oci8) in all.
May somebody have similar problem ?
Thanks, for advice.
Best regards!
g0tan
Re: propel+oracle+build problem [message #69281 is a reply to message #69279 ] Tue, 06 January 2009 10:33 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
I am guessing here: somewhere you have defined your database as 'oci' when you need to define it as 'oracle'. If you look in your symfony folder here (lib\vendor\propel-generator\classes\propel\engine\platform) you'll see the database names supported. (This is for symfony 1.0 however so the path may be different in 1.2).

Edit: start looking in your propel.ini first, I would.

[Updated on: Tue, 06 January 2009 10:34]


Remember Palestine
Re: propel+oracle+build problem [message #69283 is a reply to message #69279 ] Tue, 06 January 2009 10:47 Go to previous messageGo to next message
g0tan  is currently offline g0tan
Messages: 4
Registered: October 2007
Junior Member
Yes, I set my database url
Quote:


propel.database = oracle
propel.database.driver = oracle
propel.database.url = oci:dbname=host/xe


But when I changed url 'oci' prefix on 'oracle', I have the same error, or in database.yml, when I changed dsn on oracle...
Quote:


...
param:
dsn: oci:dbname=host/xe
...


I get the error message
Quote:


...could not find driver...


Thanks, for fast reply...
Re: propel+oracle+build problem [message #69292 is a reply to message #69283 ] Tue, 06 January 2009 14:15 Go to previous messageGo to next message
przybol  is currently offline przybol
Messages: 2
Registered: January 2009
Location: Szczecin
Junior Member
You must modified file databases.yml:
all:
  propel:
    class: sfPropelDatabase
    param:
      phptype:    oracle
      dsn:        oci:dbname=127.0.0.1/xe
      ...

add directory on $symfony_dir/plugins/sfPropelPlugin/lib/vendor/propel-genera tor/classes/propel/engine/databases/reverse/oracle and put the file OracleSchemaParser.php

Re: propel+oracle+build problem [message #69295 is a reply to message #69279 ] Tue, 06 January 2009 15:02 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
I don't know what your OracleSchemaParser file is here for, but if it's core code I am fairly sure you don't need to change it.

This is what I have for symfony 1.0/1.1 (i.e. Propel 1.2.x, rather that Propel 1.3.x, which is what is in symfony 1.2)
all:
  uat:
    class:          sfPropelDatabase
    param:
      phptype:      oracle
      hostspec:     proddb
      username:     uat
      password:     password


Remember Palestine
Re: propel+oracle+build problem [message #69296 is a reply to message #69295 ] Tue, 06 January 2009 15:13 Go to previous messageGo to next message
przybol  is currently offline przybol
Messages: 2
Registered: January 2009
Location: Szczecin
Junior Member
Propel 1.3 don't have a SchemaParser for Oracle, when I upgrade my project to symfony 1.2, we can't make a new schema and model. Propel 1.3 used a PDO.

[Updated on: Tue, 06 January 2009 15:15]

Re: propel+oracle+build problem [message #69299 is a reply to message #69279 ] Tue, 06 January 2009 16:09 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
I've used symfony 1.0 + Propel 1.3, and was able to build schemas with that. Yes, Propel 1.3 uses PDO - that shouldn't in itself prevent you from building a schema or the model. Symfony 1.2 wouldn't have utilised Propel 1.3 if this was not possible out of the box.

It's great you've got it to work, but I think you perhaps have a misconfiguration somewhere? Either that or I have misunderstood the problem Wink


Remember Palestine
Re: propel+oracle+build problem [message #102433 is a reply to message #69279 ] Tue, 13 July 2010 18:09 Go to previous message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
This is an old post, but I thought I'd acknowledge @przybol's post: I received the same error as @g0tan until I added the "phptype" key to my databases.yml.


Remember Palestine
Previous Topic:$request->getFiles($form->getName()) is empty
Next Topic:insert record into two tables at the same time
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software