SQL Server 2008; PHP version 8.2.8
PHP version
8.2.8
PHP SQLSRV or PDO_SQLSRV version
5.11.0
Microsoft ODBC Driver version
ODBC Driver 13 for SQL Server
SQL Server version
2008
Problem description
Attempted to connect to the SQL server from my Laravel php application. I am getting the following error.
SQLSTATE[01000]: [unixODBC][Driver Manager]Can't open lib '/opt/homebrew/lib/libmsodbcsql.13.dylib' : file not found
When I following the trail to locate the file, it somewhat exists in the directory.
Tried to symlink it, but no luck still
sudo ln -s /opt/homebrew/etc/odbcinst.ini /etc/odbcinst.ini
sudo ln -s /opt/homebrew/etc/odbc.ini /etc/odbc.ini
It sounds like the ODBC driver might be missing a dependency. However ODBC driver 13 is quite old, I would recommend trying a newer one, such as 18 or 17 (18 has some security features on by default), in particular because the newer drivers have a reduced number of dependencies.
Closed due to inactivity