I\'m using PHP Version 5.3.8 that was installed via XAMPP along with Microsoft SQL Server 2008 R2 (SQLEXPRESS). I have the drivers installed correctly (i guess) and have add
Not sure if this is due to running a CentOS x86_64 machine but sqlsrv didn't work as the driver for me, I had to use dblib:
sqlsrv
dblib
try { $DBH = new PDO("dblib:host=xxxx;dbname=xxxx", 'xxxx', 'xxxx'); } catch (PDOException $e) { echo $e->getMessage(); }
Source and thanks to.