0
votes

I have an error on symfony 2

FatalErrorException: Error: Class 'PDO' not found in /var/www/vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php line 155

So I searched for install and enable PDO but I did not find in /etc/php5/apache2/php.ini nor /etc/php5/cli/php.ini these lines extension=pdo.so and extension=pdo_mysql.so

Regards

EDIT:
in /php.ini I have extension=pdo.so and extension=pdo_mysql.so, i searched everywhere and everything but i don't understand why this error keep coming.
I am on a debian server with lamp.

Nobody got an answer?

1
also check your conf.d folders in apache and cli, there also entries can be made for the same. And, if you installed and enabled using command-line, you'll find entry in the folders only.Rohit Aggarwal
in conf.d there is 10-pdo.ini and 20-pdo_mysql.ini, what should I do? I did all in command linehobywhan
guess you've made an update of php or apache without reinstalling all dependencies. It seems that the extension folder of apache has changed and the pdo extension is not moved. Try reinstalling pdo.mrcrgl
i did it multiple times but did nothing, apt-get install php-pdo does not workhobywhan

1 Answers

0
votes

I found the answer there : PDO and pdo_mysql loaded but class not found I changed the

extension_dir

everywhere and it finally worked