Skip to content

in arm64 macs, the sqlsrv drivers are failing to link to the openssl libraries #1545

@triankar

Description

@triankar

Over the last 10 days I have tried literally everything on the internet, trying to get my new M4 MBP to connect to some MSSQL servers ranging from 2016 to 2022.
I'm running an M4 Max machine with the latest macOS Tahoe 26.1. My previous dev machine is a 2019 i9 MBP, where everything was running smoothly until I did the absolutely stupidest ever mistake* of upgrading all homebrew packages. "oooh, 57 packages are out of date, let's upgrade things"! 🤡 Now nothing works there as well.

The homebrew method was obviously the first thing I tried on my new machine. I followed all the usual guides at learn.microsoft.com in order to install apache2, php and sqlsrv + pdo_sqlsrv packages and everything else the guide recommends.

I started off by installing the latest packages of each. php@8.5, msodbcsql18, openssl3 etc. And I could not connect.
Then I came to read that the latest packages DON'T work, so I tried installing lesser and lesser versions, going down to php@8.2 and msodbcsql13, among other things. Obviously unlinking and relinking everything along the way. And I was very careful about keeping everything under /opt/homebrew/etc/ in check.

Again, nothing worked.

I came to understand that it is mostly due to TLS handshakes failing between my macOS machine and the server(s), but there is nothing that will make them work. And believe me I tried every hint under the -sun- web!

Then I tried the "ditch arm64, install everything x86" path, and again NOTHING works.

Maybe I'm a little rusty with my Unix shell days and [configure/make/make install], but has ANYBODY had ANY luck connecting to an SQL server from PHP in an arm64 Mac???

*yes, that's a terrible habit: I see something that says "a new version of XYZ is there" and I immediately hit "update"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions