Php – PDO : Uncaught PDOException: could not find driver

odbcpdoPHP

I'm using odbc and XAMPP. I'm receiving the fatal error of could not find driver

Fatal error: Uncaught PDOException: could not find driver in C:\xampp\htdocs\index.php:5 Stack trace: #0 C:\xampp\htdocs\index.php(5): PDO->__construct('odbc:BEGIN') #1 {main} thrown in C:\xampp\htdocs\index.php on line 5

This is the code the error refering to :

$conn = new PDO ("odbc:BEGIN");

Is there any module that I should add to the php.ini like this answer or there are other solution?

Best Answer

You need to enable those extensions in order to have ODBC PDO driver working

php_pdo.dll 
php_odbc.dll
php_pdo_odbc.dll
Related Topic