Symfony: an Exception Occured in Driver: Could Not Find Driver With MySQL

Symfony 5 - An exception occurred in driver: could not find driver

If you want to use Mysql , comment this line DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=13&charset=utf8"
If not comment the other line

Symfony : An exception occurred in driver: could not find driver

You need to install MysQl, for Ubuntu just use
sudo apt-get install php-mysql

Symfony fos:user:create through error could not find driver, (Xampp with multiple verison of PHP)

SOLUTION

Because you have two PHP versions, in the new one you need to enable the pdo_mysql extension that normaly is not.

STOP the Apache Server in the XAMPP controller.

just go in the folder C:\xampp\php7_4 and open the file php.ini

search (CTRL+F) for pdo_mysql and uncomment/remove the ";"

BEFORE ;extension=pdo_mysql

AFTER extension=pdo_mysql

SAVE the changes

START the Apache Server and re-run the symfony php bin\console fos:user:create command and it will work !!



Related Topics



Leave a reply



Submit