I have a Codeigniter 3 app that connects to an SQL Server 2008 database. We setup a new vm with Windows server 2012 r2 64bit, SQL Server Express 2012 and xampp with php 5.6.
We moved the app to it, installed the MSODBC and added the pdo_sqlsrv version 3.2 dll to the extensions folder and loaded it in the ini file, but when we started the app we got this error message:
Undefined class constant SQLSRV_ENCODING_UTF8 in pdo_sqlsrv_driver.php on line 144
I checked the docs and everything seems right, so we tried reinstalling everything with no luck. What possibly could be the problem?
For people searching for a solution for this error, I fixed it by specifying a default TCP port in SQL Server Configuration Manager.