Reputation: 395
I'm developing web-service using Symfony2 framework. I want to use pdo_mysql.
As you can see, I've installed PDO and pdo_mysql. But I get a next error when I try to use ORM in my project:
when I used doctrine from command line, it works. What is this issue?
P.S. When I try to use PDO in flat php code (eg, create index.php in htdocs with content
<?php
print_r(PDO::getAvailableDrivers());
it doesn't work (not response from server, but apache error log doesn't contain anything about php error)). But when I try using PDO in command line (eg,
php -r "eval(print_r(PDO::getAvailableDrivers()));
I get a correct array consisting of one mysql_pdo.
Upvotes: 0
Views: 393
Reputation: 5864
If you're using WAMP or something similar, IMO, your CLI environment have the PDO extension but not the apache one. PHP does not use the same configuration for these two environments...
If you want to know what is really loaded, use phpinfo()
in your different environments.
Upvotes: 1