0

I'm working on a Symfony 3.4 application. I'm using SQL Server 2017 and PHP 7.0.29. I created a Symfony command that is supposed to send emails. when i run it i got this Exception : in PDOconnection.php line 47 could not find driver

it looks like an installation problem, but i have installed all the required php drivers and i added them in my php.ini :

 extension=php_sqlsrv_7_nts_x64.dll
 extension=php_pdo_sqlsrv_7_nts_x64.dll
 extension=php_sqlsrv_7_ts_x64.dll
 extension=php_pdo_sqlsrv_7_ts_x64.dll

in my phpinfo i have sqlsrv and pdo_sqlsrv extensions, and i even can log in into my application and see data from DB.

Bkh
  • 11
  • 1
  • Possible duplicate of [this](https://stackoverflow.com/questions/35073065/cannot-find-driver-pdo-sqlsrv) SO question. – Jeroen Heier Jul 02 '18 at 16:39
  • I tried it. i still have the same problem – Bkh Jul 02 '18 at 16:46
  • Depending upon your OS you would need the `nts` (Not Thread Safe) **OR** the `ts` (Thread Safe) versions of those 2 libraries. **BUT NEVER BOTH** – RiggsFolly Jul 02 '18 at 17:39
  • Which platform your server is running on? Also you should note, `command` line and the actual website use different configuration files, so make sure this is enabled in both of them. – Vilius Jul 02 '18 at 17:39
  • If you are Windows then it will be the `ts` (Thread Safe) ones you need – RiggsFolly Jul 02 '18 at 17:42

0 Answers0