I'm trying to use doctrine, but I got the "PDO Exception: could not find driver" error, both from command line (trying to generate the entities from the database) or running in apache.
At first I though It was some problem with my config. I couldn't find anything so I created a test to see what happens. If I run this over apache or by command line it works perfectly: <?php
$result = $test->query("select reference from item limit 1000, 10");
foreach($result as $row) { echo $row['reference']."\n";
}
But when I try to access the database with doctrine it doesn't. My config file is as follows: parameters.yml: parameters: database_driver: pdo_mysql database_host: localhost database_port: ~ database_name: collectorpedia database_user: .... database_password: ....
I'been debugging this, the problems seems to come from the mopa bundle I
have installed. In the RemoteUpdateBundle there's a database.yml file:
doctrine:
dbal:
connections:
mopa_remote_update:
driver: pdo_sqlite
path: %kernel.root_dir%/Resources/mopa_remote_update.sqlite
And this is the configuration that Doctrine is using, even when in the
config.yml I have the mysql parameters.
Any idea how to solve this? I don't quite understand the configuration
structure in this case.
> I'm trying to use doctrine, but I got the "PDO Exception: could not find
> driver" error, both from command line (trying to generate the entities from
> the database) or running in apache.
> At first I though It was some problem with my config. I couldn't find
> anything so I created a test to see what happens. If I run this over apache
> or by command line it works perfectly:
> <?php
> But when I try to access the database with doctrine it doesn't. My config
> file is as follows:
> parameters.yml:
> parameters:
> database_driver: pdo_mysql
> database_host: localhost
> database_port: ~
> database_name: collectorpedia
> database_user: ....
> database_password: ....
> --
> 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 "Symfony2" group.
> To post to this group, send email to symfony2@googlegroups.com
> To unsubscribe from this group, send email to
> symfony2+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony2?hl=en
> I'm trying to use doctrine, but I got the "PDO Exception: could not find > driver" error, both from command line (trying to generate the entities from > the database) or running in apache.
> At first I though It was some problem with my config. I couldn't find > anything so I created a test to see what happens. If I run this over apache > or by command line it works perfectly:
> <?php
> But when I try to access the database with doctrine it doesn't. My config > file is as follows:
> parameters.yml:
> parameters:
> database_driver: pdo_mysql
> database_host: localhost
> database_port: ~
> database_name: collectorpedia
> database_user: ....
> database_password: ....
That's not the problem, the problem is (and I don't know how to solve it) is doctrine is using the sql_lite which is specified in the database.yml file of RemoteUpdateBundle of Mopa.
Anyone has the twitter bootstrap bundle installed and had the same problem?
El domingo, 28 de octubre de 2012 20:19:52 UTC+1, Oleg K escribió:
> Check if you have "pdo_sqlite" installed as pdo drive > <?php
> phpinfo();
> суббота, 27 октября 2012 г., 20:41:43 UTC+5 пользователь Jose написал:
>> Hi,
>> I'm trying to use doctrine, but I got the "PDO Exception: could not find >> driver" error, both from command line (trying to generate the entities from >> the database) or running in apache.
>> At first I though It was some problem with my config. I couldn't find >> anything so I created a test to see what happens. If I run this over apache >> or by command line it works perfectly:
>> <?php
>> But when I try to access the database with doctrine it doesn't. My config >> file is as follows:
>> parameters.yml:
>> parameters:
>> database_driver: pdo_mysql
>> database_host: localhost
>> database_port: ~
>> database_name: collectorpedia
>> database_user: ....
>> database_password: ....
> I'm trying to use doctrine, but I got the "PDO Exception: could not find > driver" error, both from command line (trying to generate the entities from > the database) or running in apache.
> At first I though It was some problem with my config. I couldn't find > anything so I created a test to see what happens. If I run this over apache > or by command line it works perfectly:
> <?php
> But when I try to access the database with doctrine it doesn't. My config > file is as follows:
> parameters.yml:
> parameters:
> database_driver: pdo_mysql
> database_host: localhost
> database_port: ~
> database_name: collectorpedia
> database_user: ....
> database_password: ....