On May 21, 8:35 pm, Eno <symb...@gmail.com> wrote:
> On Fri, 21 May 2010, Dennis Jacobfeuerborn wrote:
> > $con = MMDBConnection::getRead("de");
> > $this->user = $con->getTable("User")->find( 1234 );
>
> > this results in an exception: Unknown database 'dummy_db'
> > I've verified that $con contains the correct connection to the real DB
> > "member_db" but find() still tries to connect the dummy_db event
> > though I get the table from $con.
>
> Maybe posting your databases.yml file would help?

I'm not sure why since I explicitly try to get Symfony not to use the
information in there but here it is:

dev:
  dummy_db:
    param:
      dsn: 'mysql:host=127.0.0.1;port=3306;dbname=dummy_db'

all:
  dummy_db:
    class: sfDoctrineDatabase
    param:
      dsn: 'mysql:host=127.0.0.1;dbname=dummy_db'
      username: <DELETED>
      password: <DELETED>

The getRead() function is supposed to establish a connection based on
the $country parameter like this:

$con = Doctrine_Manager::connection("mysql://<DELETED>:<DELETED>@".
$dbdata["host"].":".$dbdata["port"]."/".$dbdata["name"],
"member_db" );

where $dbdata is a plain array conraining the database hostname, port,
etc.

What I would expect is that when using $con->getTable()... Symfony/
Doctrine should access "member_db" but instead I get an error that it
cannot connect to "dummy_db" (which is obvious since it doesn't exists
and isn't supposed to).

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to